服务器直接初始化所有数据监听...
parent
b1150377fc
commit
e83960ff89
|
@ -15,7 +15,7 @@ namespace UDPServer
|
|||
public partial class Frm_Server : Form
|
||||
{
|
||||
UdpClient client;
|
||||
IPEndPoint endpoint;
|
||||
IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, 0);
|
||||
Dictionary<string, IPEndPoint> userinfo = new Dictionary<string, IPEndPoint>();
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue