title: C++ libraries for non-blocking, line-oriented socket I/O?
body: <p>I'm going to be writing a <strong>Linux</strong> 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.</p>
  
  <p>I'd like to use <strong>select()</strong> or <strong>epoll()</strong> 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 <strong>select()</strong> pops.  What I'm looking for is a library that provides an API similar to <strong>epoll()</strong> and <strong>sysread()</strong>, but works on the basis of entire <strong>lines</strong> of data being buffered and ready to read.</p>
  
  <p>I'm surprised not to have been able to find anything like this in my Internet searches - I would have thought this was a fairly common need.  (Maybe I haven't worded the problem correctly.)  It doesn't seem too difficult to write, but I'd suspect that an open-source solution would be more bullet-proof.</p>