title: boost::asio get client ip
body: <p>I'm writing a server over TCP using <a href="http://www.boost.org/doc/libs/1_52_0/doc/html/">boost::asio</a>. I'm trying to find a way to block connections outside localhost. Only thing I found is <a href="http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/overview/networking/protocols.html#boost_asio.overview.networking.protocols.tcp_servers">this</a>. There is:</p>
  
  <pre><code>boost::asio::ip::host_name()
  </code></pre>
  
  <p>which returns "tomasz-lenovo-ideapad-Y530" (that's the name of my machine). How to get raw ip ("127.0.0.1" or "localhost") from it?</p>