📄 15.7.txt
字号:
Listing 15.7 Creating a UDP Server
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Collections;
namespace _5_UDPServer
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
UDPServer server = new UDPServer();
server.Run();
}
}
struct ConnectedClient
{
public IPEndPoint ip;
public string name;
}
class UDPServer
{
private UdpClient udp;
private IPEndPoint remoteEndPoint;
private ArrayList clients;
public UDPServer()
{
clients = new ArrayList();
udp = new UdpClient( 2003 );
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -