BernieC has asked for the wisdom of the Perl Monks concerning the following question:
so I have no clue what the flags do, but the tutorials seem to all give a value of 0. ??$ man 2 send No manual entry for send in section 2
But my real interest in the switchover is to get reads to time out. I have a pokey host I connect to; sometimes {annoyingly regularly} the server seems to balk and my program just hangs, dead in the water, on the <$server>. So what I'd like to do is use the socket timeout mechanism to let my program continue. I see that there's a Timeout parameter that unhelpfully just says "Timeout value for various operations". ?? Units?? {I'd have guessed milliseconds, but IO::Socket says it is in seconds, which makes sense} which operations?? what happens when the timeout value is reached??
Also, my incoming data is line-at-a-time and so the <$ssh> is perfect for what I need. Is there an equivalent way to do that with IO::Socket? I guess I could recv a character at a time until I got a newline.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: IO::Socket tutorial
by haukex (Archbishop) on Feb 17, 2020 at 16:14 UTC | |
by BernieC (Pilgrim) on Feb 19, 2020 at 12:25 UTC | |
by haukex (Archbishop) on Feb 19, 2020 at 15:48 UTC | |
by BernieC (Pilgrim) on Feb 19, 2020 at 21:05 UTC | |
by haukex (Archbishop) on Feb 20, 2020 at 00:31 UTC | |
| |
Re: IO::Socket tutorial
by haukex (Archbishop) on Feb 20, 2020 at 16:36 UTC |