in reply to Socket hangs
because it keeps trying to read until the EOF is reached, but this only happens if the remote server closes the connection.while(<$addr_handle>) {
To read (or write) from sockets without blocking you have to use sysread, syswrite and select. Any good book about Unix or Network programing explains how to do it (usually in C, but in Perl it's almost the same), Stein's "Network Programing with Perl" is also a good book. And I am sure there are also several tutorials online.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Socket hangs
by navarro (Initiate) on Dec 23, 2005 at 14:36 UTC |