Skip to content

hradec/async-sockets-cpp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous Sockets for C++

Simple, thread-based, non-blocking asynchronous Client-Server classes in C++ for TCP & UDP.

!! -- This library not optimized for using on production -- !!

// Initialize a tcp socket.
TCPSocket tcpSocket;

// Connect to the host.
tcpSocket.Connect("127.0.0.1", 8888, [&] {
    cout << "Connected to the server successfully." << endl;

    // Send String:
    tcpSocket.Send("Hello Server!");
});

Super Easy!

CPU & RAM Usages (with single tcp connection & with single udp server + client): Lightweight

Lightweight!

Examples:

Examples You can compile all the examples by just going in the examples/ directory and run make in terminal:

Future TO-DOs:

  • Add Windows support (the library is only for *nix based systems like Linux & MacOS.)

About

Simple thread-based asynchronous TCP & UDP Socket classes in C++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 72.5%
  • Makefile 17.3%
  • CMake 6.5%
  • C 3.7%