title: Connect client to multiple servers in C
body: <p>I would like to create a client which connects to multiple servers (say, 5 servers). The client needs to send different data to these 5 servers. I have looked into select(), pthreads, and fork () however all the examples I find rely on accept() to create a new socket. </p>
  
  <p>Since this is a client, I found that I do not need to call bind (), accept() etc. : <a href="https://stackoverflow.com/questions/5402019/connecting-to-multiple-servers-from-a-single-client-socket-c">Connecting to multiple servers from a single client socket C</a> </p>
  
  <p>Basically, what I would like to do is as follows:</p>
  
  <p>On the client side: </p>
  
  <ul>
  <li>Create 5 sockets</li>
  <li>use connect () to connect these sockets to the 5 servers</li>
  <li>send the data to these servers concurrently</li>
  <li>receive this data back in the client </li>
  </ul>
  
  <p>Could anyone please post some pseudo code/ link me to some resources to achieve what I need? </p>