Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have not done much socket programming and here I get a script that I have to modify and don't know how. I tried searching this site and a book, but to no avail. Please help (grin).
The script reads lines from a socket using:
The lines can be grouped by some criteria and when the first line from a group arrives I know how many more lines to expect. Now, if the connection is lazy or someone forgot to send some lines from the group, I should be able to discover it after let's say 5 minutes, log an error and continue with reading from the socket. Any ideas will be gladly received...while (<$sock>) { ... }
topsik
Edit by dws for tag cleanup
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading from socket with timeout (sort of)
by perlplexer (Hermit) on May 09, 2002 at 17:22 UTC |