CNetLib is a high-level, multithreaded networking library for handling TCP messaging.
- Complete rewrite with full support for ASIO features
- Better performance
- Text messaging
- File transfer + streaming
Each new connection spawns a server thread that reads data, and passes complete messages to user-defined handling functions (subject to change).
Uses a 64k network buffer by default.
Message type is stored in a 32-bit integer in the header of each message, after the size of the message, which is a 64-bit integer.
Users can define their own message type handlers by passing the 32-bit message type id to NetObj::add_typespec_handler(id,[](){});
Messages of type id
will be passed to the callable in the second parameter.
Examples coming soon
- ASIO 1.18.1 (non-boost) Or release 1.13.0+
- gcutils