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

Re^4: IO Socket - Detect inbound IP

by sans-clue (Beadle)
on Jan 25, 2011 at 20:54 UTC ( [id://884218]=note: print w/replies, xml ) Need Help??


in reply to Re^3: IO Socket - Detect inbound IP
in thread IO Socket - Detect inbound IP

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: IO Socket - Detect inbound IP
by Anonymous Monk on Jan 25, 2011 at 21:13 UTC
    I have tried inet_ntoa and peerhost, both run without error, but do not return an ip address. Is 'Ass' your only mode of reply ?

    Sure, thats what you say, but 1) you don't show your code 2) the documentation contradicts you 3) tests contradict you

Re^5: IO Socket - Detect inbound IP
by ikegami (Patriarch) on Jan 25, 2011 at 22:06 UTC

    Really? You're taking offense at "Don't blame the tool if you don't understand its output."? Well, I take offense at unfounded accusations, so I guess we're in the same boat.

    $ perl -MIO::Socket::INET -E'say IO::Socket::INET->new(LocalPort=>6969 +, Listen=>1)->accept->peerhost' 192.168.3.58

    Feel free to prove me wrong. "peerhost runs without error but do not return an ip address" doesn't cut it.

    Update: Apparently, I was a little off about the return value from accept, but peerhost does work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-24 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found