Skip to content

kronkorp/kronknet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

142 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues License LinkedIn


Logo

KronkNet

A simple and fast asynchrone network library
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

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.

(back to top)

Built With

  • C

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

have CMake installed

apt install cmake

Installation

  1. Clone the repo
    git clone https://github.com/GauthierMalfilatre/kronknet.git
    cd kronknet/
  2. Use provided tools.sh file
    ./tools.sh -r
  3. Installing the library
    cd Release/
    sudo make install

(back to top)

Usage

You can find an exemple of usage here

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the MIT license. See LICENSE for more information.

(back to top)

Contact

Gauthier Malfilatre - @GauthierMalfilatre - gauthier.malfilatre@epitech.eu

Project Link: https://github.com/GauthierMalfilatre/kronknet

(back to top)

Releases

Packages

Contributors

Languages