I understand it timeouts or gets refused when you have one conection establilished? If that's the case, you need to make your server support more than one connection at once. Forking isn't a good idea, but threads or use of select() function is. For first time, select() is probably easier. Man page has a short example (not using sockets, but it's the same).
|