Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: AJP ping

by Anonymous Monk
on Apr 10, 2015 at 08:52 UTC ( #1123023=note: print w/replies, xml ) Need Help??


in reply to Re: AJP ping
in thread AJP ping

sysread does not guaranteed, that all 5 bytes can be readed in one block. so you should add a loop over the sysread command.
my $pos = 0; while ( $pos < 5) { my $c = sysread $sock, $pong, 5, $pos or die $!; $pos += $c; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2023-03-20 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?