I want to write an server application that is connected to a client application or reverse , connected through unique IP address and port number that can perform period check or ping to see if the other is active. Normally, a ping request uses ICMP messages to check whether destination IP address is active but how to do the same for a given client/server application provided <IP, port no.>.
I have written all code in visual C# 2008. Please suggest for c# or c++.

Recommended Answers

All 2 Replies

I'd do it by sending an async message with a timeout. If you don't get a response back in time you'd assume the client is dead.

pseudorandom21's suggestion would tell you if the client machine is pingable, but I don't think that is what you were asking.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.