No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There really should be a FAQ that says "Don't use <$sock>". It hangs until it sees a newline (or whatever you've put into $/) or until EOF (see shutdown or close) and is so very often the cause of "hanging" in socket code in Perl. Use read or sysread or recv instead. Even if you expect that each request (or item that you want to read) will end with a newline, using <$sock> doesn't allow you to give reasonable error reporting when this expectation isn't met, and thus makes your code hard to troubleshoot. I didn't look carefully at your code. I'll try to if this doesn't turn out to be the problem. - tye In reply to Re: Socket to Socket to Socket (read)
by tye
|
|