in reply to select appears to ignore pending data on socket.
If the currently available data on $sock does not contain a newline (or whatever you've set the record separator to), that call will block until it does.#pull data from the socket my $data = <$sock>;
The same sort of thing may happen if you print() to a socket and the other side is slow in receiving.
You should probably make sure that the sockets are non-blocking (see IO::Socket::INET) and use the recv() and send() calls to recieve and send data - since they will work right on non-blocking calls.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: select appears to ignore pending data on socket.
by Zidane (Acolyte) on Nov 03, 2007 at 19:35 UTC | |
|
Re^2: select appears to ignore pending data on socket.
by Zidane (Acolyte) on Nov 03, 2007 at 20:18 UTC | |
by Joost (Canon) on Nov 03, 2007 at 21:04 UTC | |
by Zidane (Acolyte) on Nov 03, 2007 at 22:40 UTC | |
by Zidane (Acolyte) on Nov 03, 2007 at 21:54 UTC |