in reply to Pinging server using multithreading concept
Try using asynchronous I/O rather than threads--i.e., fire off multiple pings, but rather than using a blocking read to get the response, you process responses asynchronously as they arrive. Using select on an array of sockets could do the trick, or maybe you'd prefer something like POE or IO::Lambda::Socket which handle much of the mechanics for you. (Note: I've used neither POE nor IO::Lambda::Socket, so I can't further comment on them.)
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pinging server using multithreading concept
by Illuminatus (Curate) on Nov 16, 2009 at 16:38 UTC | |
by Anonymous Monk on Nov 18, 2009 at 09:35 UTC | |
|
Re^2: Pinging server using multithreading concept
by Anonymous Monk on Nov 18, 2009 at 09:29 UTC |