10-01-2019, 05:19 AM
As for the API / library - networking IS HARD, there's no shame in using a library that already shields you from the nasty low-level problems you'd encounter otherwise. For example, the select() API you might be tempted to use works alright on Windows, but is hopelessly broken on Linux / Unix; the function signatures are the same on both platforms, but each platform has its quirks that make writing multiplatform code a nightmare. Threading, which I advised as the minimal helping API, is heavy - two threads per client is unacceptable for high-throughput / high-availability servers.
People have been saying good stuff about boost::asio, it's modern, it's c++; if I were to start a new server project, I'd seriously consider learning it.
People have been saying good stuff about boost::asio, it's modern, it's c++; if I were to start a new server project, I'd seriously consider learning it.