title: boost asio iostream - how to get local IP address
body: <p>Here is my problem:
  I'm using boost::asio::ip::tcp::iostream to connect to server:</p>
  
  <pre><code>boost::asio::ip::tcp::iostream s(IP, "1237");
  </code></pre>
  
  <p>And now I want to retrieve my own, local IP address. I have found somewhere in the depths of google how to do it with a <a href="https://stackoverflow.com/questions/6846050/boost-asio-socket-how-to-get-your-own-ip-port-adress">socket</a>, but what about a stream? 
  I expect that since tcp::iostream is built on the top of a socket it should be something like:
  s.local_endpoint().address()
  but after a long search with google and duckduckgo I have found no clue how to do it. I have tried several most obvious permutations, but still no luck.
  So, is there any simple way to do it, or do I have to use socket?
  It only has to work on Linux, if it is important. </p>