Why are you adding the socket to (just) $pexceptions? An incomming connection counts as a read. Since you didn't add the socket to $pread, the select won't wake up on an incomming connection. (A broken connection would be an example of an exception.) Add
$pread->add($sock);
By the way, why did you make $pread, $pwrite, $read and $write singular? Like $pexceptions and $exceptions, they should be plural since they are lists.
In reply to Re: IO::Select and sockets
by ikegami
in thread IO::Select and sockets
by cog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |