title: How can I get the remote address from a CFStream in iOS?
body: <p>I am connecting to a hostname using CFStreams in my iOS app like:</p>
  
  <pre class="lang-c prettyprint-override"><code>CFStreamCreatePairWithSocketToHost(NULL, (__bridge CFStringRef)host, port, &amp;readStream, &amp;writeStream);
  
  outputStream = (__bridge NSOutputStream *)writeStream;
  inputStream = (__bridge NSInputStream *)readStream;
  </code></pre>
  
  <p>But I want to know how I can get the remote IP address of <code>host</code> from the stream?</p>