Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: How to find out whether socket is still connected?

by spadacciniweb (Deacon)
on Aug 10, 2006 at 09:53 UTC ( #566579=note: print w/replies, xml ) Need Help??

in reply to How to find out whether socket is still connected?

In Unix systems, you can try
system 'netstat -na'
and you get information about internet connections
and sockets.

Update: you can try module Net::Netstat::Wrapper

Replies are listed 'Best First'.
Re^2: How to find out whether socket is still connected?
by tcf03 (Deacon) on Aug 11, 2006 at 14:08 UTC
    lsof -Pni :80
    will also do the trick. Of course substituting your port number for 80.

    "That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
      --Ralph Waldo Emerson

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://566579]
[zentara]: choroba I stand corrected, I guess Jesus killed a tree once too.
[erix]: the neighbours (a nat.hist. museum) have a narwhal skull with *2* tusks
[erix]: ( also: UniCorn Throne )
[zentara]: erix I hope both tusks pointed in the same direction :-)
LanX "♪..♫ Last night a DJ killed my wife ♪..♫ "
zentara...oO 1 more reason I prefer Perl to Python is I can't believe how long Python takes to compile, and you can't disable the myriad of tests

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-03-30 16:41 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (361 votes). Check out past polls.