title: Get IP address from socket descriptor?
body: <p>I've opened a TCP socket server (I've omitted a few stuff, it is taken from <a href="http://beej.us/guide/bgnet/output/html/multipage/clientserver.html#simpleserver" rel="noreferrer">here</a></p>
  
  <pre><code>sockfd = socket(p-&gt;ai_family, p-&gt;ai_socktype,
              p-&gt;ai_protocol))
  </code></pre>
  
  <p>Is it possible to get the IP address of the server from sockfd? If not where should I look?</p>
  
  <p>EDIT: I want to know the address of the server (this is before any client connects).</p>