当前位置:   article > 正文

c#编写网口调试助手-NetStudio(1)_c#网络调试助手

c#网络调试助手
  1. using System;
  2. using System.Diagnostics;
  3. using System.Net;
  4. using System.Net.Sockets;
  5. using System.Text;
  6. using System.Threading;
  1. private Socket client;
  2. public bool isConnected = true;
  1. public bool Open(string ip, string port)
  2. {
  3. IPEndPoint remoteEP = new IPEndPoint(IPAddress.Parse(ip), Convert.ToInt32(port));
  4. this.client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
  5. this.client.Connect(remoteEP);
  6. return true;
  7. }

部分代码如上:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/583715
推荐阅读
相关标签
  

闽ICP备14008679号