A simple and fast asynchrone network library
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
KronkNet is a high-performance asynchronous TCP network library.
Built around the poll() system call and an event-driven architecture, it allows for the management of numerous simultaneous connections on a single thread. KronkNet integrates an internal ring buffer system to prevent OS blockage during massive data transfers (Fast Path/Slow Path mechanism with POLLOUT).
Key Features:
-
100% Non-Blocking: The server never freezes the main game loop.
-
O(1) Binding: Dual-pointer (user_data) system for lookup-free interaction between the network engine and application entities.
-
Multi-protocol support: Currently, kronknet supports both TCP and UDP. In TCP mode, connections are stored in a dynamic array, whereas in UDP mode, they are kept in a hash table, offering O(1) lookup complexity in most cases.
To get a local copy up and running follow these simple example steps.
have CMake installed
apt install cmake- Clone the repo
git clone https://github.com/GauthierMalfilatre/kronknet.git cd kronknet/ - Use provided
tools.shfile./tools.sh -r
- Installing the library
cd Release/ sudo make install
You can find an exemple of usage here
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT license. See LICENSE for more information.
Gauthier Malfilatre - @GauthierMalfilatre - gauthier.malfilatre@epitech.eu
Project Link: https://github.com/GauthierMalfilatre/kronknet