title: How can I create an 'ostream' from a socket?
body: <p>In C++, if I have a socket, how can I create an ostream object from it?</p>
  
  <p>I have googled some example:
  <a href="http://members.aon.at/hstraub/linux/socket++/docu/socket++_10.html" rel="noreferrer">http://members.aon.at/hstraub/linux/socket++/docu/socket++_10.html</a></p>
  
  <p>And I have tried:</p>
  
  <pre><code> sockbuf sb(sockfd);
   std::ostream outputStream(&amp;sb);
  </code></pre>
  
  <p>But I can't find the .h file and the library to link with for 'sockbuf'. Is that part of a standard c++ library?</p>