UDP:
流程和概括图,详细查阅文章:xxx
服务端启动文件
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace _023_socket编程_UDP协议_服务器端 {
class Program
{
private static Socket udpServer;
static void Main(string[] args) {
//1,创建socket
udpServer = new Socket(AddressFamily.InterNetwork