Hello,
I'm currently implementing a software in which communication between stations via sockets is used.
My problem is that before opening a socket connection I
would like to know if the station I want to establish a socket connection to can be pinged.
With the Ping command it is possible to send a timeout
and therefore to quickly know if a station is on the network.
Setting the timeout is important since I have performance
difficulties. The connect API to establish the socket connection is to long to fail when the station can not be
found on the network.
I found some source code example in the MSDN library (sending ICMP echo )but the timeout for the response does
not work. I use Microsoft Visual C++ 6 under Windows XP.
My MSDN is the January 2001 release.
Does anybody has some code for pinging in which a time out
for sending and receiving can be done ? Did it change with XP ?
I'm currently implementing a software in which communication between stations via sockets is used.
My problem is that before opening a socket connection I
would like to know if the station I want to establish a socket connection to can be pinged.
With the Ping command it is possible to send a timeout
and therefore to quickly know if a station is on the network.
Setting the timeout is important since I have performance
difficulties. The connect API to establish the socket connection is to long to fail when the station can not be
found on the network.
I found some source code example in the MSDN library (sending ICMP echo )but the timeout for the response does
not work. I use Microsoft Visual C++ 6 under Windows XP.
My MSDN is the January 2001 release.
Does anybody has some code for pinging in which a time out
for sending and receiving can be done ? Did it change with XP ?