public async Task ListenServiceClient(IDbOperator dbOp) { //侦听,并且构造连接池 Server.Logger.Debug("Listening client on port " + ServerContext.ServerConfig.ReversePort + "..."); TcpListener listener = new TcpListener(IPAddress.Any, ServerContext.ServerConfig.ReversePort); listener.Start(1000); while (true) { SecurityTcpClient incomeClient = await listener.AcceptSecureTcpClientAsync(dbOp); Server.Logger.Debug("已建立一个空连接" + incomeClient.Client.Client.LocalEndPoint.ToString() + "-" + incomeClient.Client.Client.RemoteEndPoint.ToString()); incomeClient.Client.SetKeepAlive(out _); _ = ProcessReverseRequest(incomeClient); } }