in reply to Re^8: Problem handling 2 simultaneous socket streams
in thread Problem handling 2 simultaneous socket streams
Your code is kind of complex for me to setup and run and test myself. However, if you are experiencing blocking problems, yes, switch to sysread. The other thing to try is to put a timeout in your select statement, I noticed you have none.
while(my @ready = $sockets->can_read) { #got data # add a timeout to your select while(my @ready = $sockets->can_read (.1) ) { } # 100 ms timeout
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Problem handling 2 simultaneous socket streams
by PhillyR (Acolyte) on Oct 06, 2011 at 16:46 UTC |