摘要:
以下介绍C# ping命令的两种实现方法。C# ping命令实现:利用原始Socket套接字,实现ICMP协议。usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Net; usingSystem.Net.Sockets; namespacePingC { classping { constintSOCKET_ERROR=-1; constintICMP_ECHO=8; staticvoidMain(string[]args) { pingp=newping(); Console.WriteLi 阅读全文