Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Winsock Ping Another Computer

Author
Message
bobba
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 3rd May 2008 23:05
At the moment to ping another computer in my program I record the time send a message to another computer running my program. The other computer sends an echo when it receives the message. The sender waits in a loop until the echo the records the time again. The difference of these 2 times is the ping. This works.

Firstly is there a special ping command for C++/Winsock? And if there is how is it used?

And secondly is there a system built into windows I can use. I.e. you can type "ping xxx.xxx.xxx.xxx" into the command prompt to ping another computer. Therefore is there some magic port number I can send some special message to get a ping echo?

Thanks in advance for any help.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd May 2008 23:48
ping is its own protocol. Google it and look for the RFC for it ...

it's a packet, with data a certain way, a port I think thats it...

BTW - as such, it might be blocked on firewalls as a security precaution. ping can be used for good and evil.

Login to post a reply

Server time is: 2024-09-29 19:21:14
Your offset time is: 2024-09-29 19:21:14