Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: AJP ping

by Anonymous Monk
on Apr 10, 2015 at 08:52 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-06-22 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.