The best way I've found of handling multiple tcp connections on the same socket is to use a poll file device with the listen()ing socket itself as the first pfd. The example below is based on a i5/OS example available from IBM at http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/index.jsp?topic=/rzab6/example.htm. I've made some minor changes to how flags are set to allow the example below to work on Linux/Win/BSD. (Please note the lack of error checking in the code below. You should obvio
More
Give back to creators
Give microdonations when you Like, Favorite & Star.
