在AsynServer中对接收函数增加接收判断,如果收到客户端发送的请求信息,则发送10个测试包给发送端,否则继续接收,修改后的接收代码如下: private void AsynReceive() { ];//接收缓存 string receiveStr; );//生成发送数组,10个包 socket.BeginReceive(data, , data.Length, SocketFlags.None, asyncResult => { int length = socket.EndReceiv…