Skip to content
/ cnetlib Public

CNetLib is a high-level, multithreaded networking library for handling TCP messaging

Notifications You must be signed in to change notification settings

gmbows/cnetlib

Repository files navigation

CNetLib

CNetLib is a high-level, multithreaded networking library for handling TCP messaging.

Changes in v4

  • Complete rewrite with full support for ASIO features
  • Better performance

Features

  • Text messaging
  • File transfer + streaming

Architecture

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.

Usage Examples

Examples

Examples coming soon

Dependencies

About

CNetLib is a high-level, multithreaded networking library for handling TCP messaging

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published