Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: function to count pending packets in TCP socket

by thanos1983 (Vicar)
on Jan 31, 2018 at 10:28 UTC ( #1208176=note: print w/replies, xml ) Need Help??


in reply to function to count pending packets in TCP socket

Hello Anonymous Monk,

I found this thread How can I test TCP socket status in Perl?. The accepted answer is:

$socket = IO::Socket::INET(localhost, 1000); die "no connection" unless $socket -> connected(); $socket -> send("your face here for $20"); die "socket is dead" unless $socket -> connected(); $socket -> recv($data);

Let us know if it works, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208176]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-06-21 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (118 votes). Check out past polls.

    Notices?