If you want to avoid blocking on a read, try reading up on IO::Select. This module wraps around the select() socket API, basically letting you know when a handle may be read from (has data waiting to be read) or written to.
See Using socket descriptor with IO::Select for a detailed explanation.
dmm
If you GIVE a man a fish you feed him for a dayIn reply to Re: reading lines from sockets with while
by dmmiller2k
in thread reading lines from sockets with while
by Amoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |