From e83960ff89cc258b3b0dfb461caa6d615223071e Mon Sep 17 00:00:00 2001 From: j502647092 Date: Wed, 5 Aug 2015 19:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=89=80=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9B=91=E5=90=AC...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UDPServer/Frm_Server.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/UDPServer/Frm_Server.cs b/UDPServer/Frm_Server.cs index a348054..1100856 100644 --- a/UDPServer/Frm_Server.cs +++ b/UDPServer/Frm_Server.cs @@ -15,7 +15,7 @@ namespace UDPServer public partial class Frm_Server : Form { UdpClient client; - IPEndPoint endpoint; + IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, 0); Dictionary userinfo = new Dictionary(); public Frm_Server() { @@ -25,7 +25,6 @@ namespace UDPServer private void Frm_Server_Load(object sender, EventArgs e) { client = new UdpClient(new IPEndPoint(IPAddress.Any, 25433)); - endpoint = new IPEndPoint(IPAddress.Any, 0); //启动客户端监听 Thread t = new Thread(new ThreadStart(ClientThread)); t.IsBackground = true;