This is my another experiment with sockets in C++. The C API is simple and useful, but sometimes You would like to have more user-friendly API.

https://github.com/pantadeusz/simple-cpp-sockets

How do you like it? Critical reviews and suggestions are welcome. This is totally experimental code.

Sample usage (create server):

tp::net::server srv([&](tp::net::socket &s) {
    s.on(DATA, [&s, &continue_serving](std::string str) {
      std::cout << "<<" << str << std::endl;
      s.write(std::string(">>") + str);
    });
  });
srv.listen(2212);