title: How to set socket timeout in C when making multiple connections?
body: <p>I'm writing a simple program that makes multiple connections to different servers for status check. All these connections are constructed on-demand; up to 10 connections can be created simultaneously. I don't like the idea of one-thread-per-socket, so I made all these client sockets Non-Blocking, and throw them into a select() pool.</p>
  
  <p>It worked great, until my client complained that the waiting time is too long before they can get the error report when target servers stopped responding.</p>
  
  <p>I've checked several topics in the forum. Some had suggested that one can use alarm() signal or set a timeout in the select() function call. But I'm dealing with multiple connections, instead of one. When a process wide timeout signal happens, I've no way to distinguish the timeout connection among all the other connections.</p>
  
  <p>Is there anyway to change the system-default timeout duration ? </p>