摘要:
C# codenamespace UDPServer{ class Program { static void Main(string[] args) { int recv; byte[] data = new byte[1024]; //构建TCP 服务器 //得到本机IP,设置TCP端口号 IPEndPoint ipep = new IPEndPoint(IPAddress.Any , 8001); Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram , ProtocolType.Udp); // 阅读全文