需要使用到的包 using System.Net; using System.Net.Sockets; 代码如下: 服务端代码: 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; name…