title: Accept multiple subsequent connections to socket
body: <p>I have a listener that will pass arbitrary data, HTTP requests, to a network socket which is then delivered over TCP. This works fine for the first request but the listener does not accept subsequent new requests.</p>
  
  <p>My question is:</p>
  
  <p>If I have <code>sock=accept(listener,(struct addr *)&amp;sin, &amp;sinlen);</code> then, based on the socket function reference, the listener socket remains open and I should be able to re-call <code>accept()</code> any number of times for subsequent requests. Is this correct? If so, can someone more familiar than I with socket programming please explain how this code might look?</p>