Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Optimized remote ping (syn/ack)

by themonk (Acolyte)
on Jul 17, 2015 at 18:45 UTC ( [id://1135208]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Optimized remote ping (syn/ack)
in thread Optimized remote ping

I got the correct parameters,

$p->port_number("3000", "tcp");

Explanation:

getservbyname function takes the first parameter and sends its defined port to tcp. E.g., "ftp" => 22, "http" => 80 If custom port is to be mentioned, dont use "getservbyname".

Correct me if my understanding is wrong.

Thanks guys for all the help. BTW, the response time now is "5secs for 50 IP's" GREAT Response time. :-)

Replies are listed 'Best First'.
Re^4: Optimized remote ping (syn/ack)
by BrowserUk (Patriarch) on Jul 17, 2015 at 19:05 UTC

      I made the necessary changes in the code.

      currently I am running on localhost...so according only "127.0.0.1"should be pingable on port "3000".

      But I get this IP "127.115.99.245" also pingable as TRUE. is there some more changes like timeout or something which i might need to tweak around.

        currently I am running on localhost...so according only "127.0.0.1"should be pingable on port "3000". But I get this IP "127.115.99.245" also pingable as TRUE

        Yes, that's perfectly ok. localhost has a whole Class-A subnet assigned in IPv4, 16.7 million addresses, all starting with "127.", all just for the machine you are currently working with. Yes, that's a big waste of IP addresses, but it's an old decision that can't be changed now.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found