TCP/UDP网络调试助手

时间:2022-08-21 15:35:19
【文件属性】:

文件名称:TCP/UDP网络调试助手

文件大小:66KB

文件格式:ZIP

更新时间:2022-08-21 15:35:19

C# TCP/IP TCP/UDP

private void Form1_Load(object sender, EventArgs e)//初始化为UDP Server模式 { cobProtocol.SelectedIndex = 0; txtIP.Text = GetAddressIP(); Control.CheckForIllegalCrossThreadCalls = false; } string GetAddressIP() { string AddressIP = ""; foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).AddressList) { if (_IPAddress.AddressFamily.ToString() == "InterNetwork") { AddressIP = _IPAddress.ToString(); ip = _IPAddress;//设定全局的IP } } return AddressIP; } private void btnStart_Click(object sender, EventArgs e)//设置目标IP(Client),本地IP(Server)


【文件预览】:
NetWork
----NetWork()
--------Form1.Designer.cs(9KB)
--------Program.cs(519B)
--------obj()
--------bin()
--------Form1.cs(8KB)
--------Form1.resx(6KB)
--------App.config(187B)
--------NetWork.csproj(4KB)
--------Properties()
----.vs()
--------NetWork()
----NetWork.sln(990B)
----NetWork.v12.suo(27KB)

网友评论