title: How to fill sockaddr_storage?
body: <p>I am trying to use <code>sockaddr_storage</code> struct in my application. I am curious how to fill it. For example I have following code:</p>
  
  <pre><code>sHostAddr.sin_family = AF_INET;
  sHostAddr.sin_addr.s_addr = inet_addr (cpIPAddress);
  </code></pre>
  
  <p>How can I replace it if I use <code>sockaddr_storage</code> struct? I know that there are some char arrays, and I suppose I can get an equivalent code using some array index offsets?</p>
  
  <p>Thanks on advance.</p>