* * *

Author Topic: Ping a specific port  (Read 714 times)

sk.loda98

  • Newbie
  • Posts: 3
Ping a specific port
« on: April 27, 2017, 03:16:20 pm »
Hi guy.
Today i have a small problem with PingSend in synapse
http://synapse.ararat.cz/doc/help/pingsend.TPINGSend.html

pingsend can ping a host. But when i try Ping a host like 192.168.100.2:8000 and it doesn't work.

Can anyone help me?
p/s:sorry for my really really bad english



Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 324
    • Lebeau Software
Re: Ping a specific port
« Reply #1 on: April 28, 2017, 08:53:27 pm »
pingsend can ping a host. But when i try Ping a host like 192.168.100.2:8000 and it doesn't work.

Of course not, because '192.168.100.2:8000' is not a valid hostname, you must remove the ':8000' portion.  This is because you can't ping a specific port to begin with, only a host.  Pings use the ICMP protocol, which operates at layer 3 of the OSI Network model, whereas ports are used by the UDP and TCP/IP protocols, which operate at layer 4 instead.  Ports don't exist at layer 3.

If you want to check if a server is running on port 8000, the only option is to actually try to connect to it.
« Last Edit: April 28, 2017, 08:55:01 pm by Remy Lebeau »
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) open source project - Admin, Developer

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus