satanowicz
satanowicz

Reputation: 11

The simplest way to check if host is online (listening on a port) in C#

What's the simplest way to check if anything is listening on net.tcp://localhost:8801/ Preferably using WCF

Upvotes: 1

Views: 474

Answers (1)

Mehrdad Afshari
Mehrdad Afshari

Reputation: 421978

I don't think WCF is the best way to do that. Simply open a Socket (or TcpClient) and try connecting to that endpoint.

Upvotes: 4

Related Questions