I have a server in C++ using UNIX sockets that currently blocks on read() calls from a single client. I’d like to be able to extend the server so that I could write some data to the socket while still being able to read from the socket? Is a thread library like Boost.Thread the best way to accomplish this, or is there some other way that would be easier/more efficient?
Share
You have lots of options. At least four:
The easiest is the one you know :). So for me asio would be nightmarish and
epollwould be piece of cake. Your mileage may vary.As for efficiency, it’s hard to beat the implementation-specific replacements for
select.