Checking network status in C#

后端 未结 7 1933
时光取名叫无心
时光取名叫无心 2020-11-30 05:05

How do I check that I have an open network connection and can contact a specific ip address in c#? I have seen example in VB.Net but they all use the \'My\' structure. Than

7条回答
  •  隐瞒了意图╮
    2020-11-30 05:26

    Well, you would try to connect to the specific ip, and handle denies and timeouts.

    Look at the TcpClient class in the System.Net.Sockets namespace.

提交回复
热议问题