C++ libraries for non-blocking, line-oriented socket I/O?

view full story

http://stackoverflow.com – I'm going to be writing a Linux client that will make a socket connection to five (or so) servers. The client will send a "line" (a string followed by "\n") to each one, and will receive a line back from each one. I'd like to use select() or epoll() in the client; however, this being TCP and stream-based, I'm not guaranteed to have an entire "line" in the system buffer when the select() pops. What I'm looking for is a library that provides an API similar to epoll() and sysread(), but works on the basis of entire lines of data being buffered and ready to read. I'm surprised not to have been (HowTos)