void ITcpClientListener.SocketDidConnect() { ReliableChannel.Add(this.reliableChannel); this.udpSocket.Bind(this.tcpSocket.localEndPoint); this.udpSocket.Connect(this.tcpSocket.remoteEndPoint); this.listener?.NetworkClientDidConnect(); }
void ITcpServerListener <TcpSocket> .SocketDidAccept(TcpSocket socket) { ThreadChecker.AssertAcceptThread(); if (socket == null) { return; } socket.serverListener = this; var reliable = new ReliableChannel(socket); ReliableChannel.Add(reliable); this.socketCollection.Add(socket, reliable); this.listener?.NetworkServerDidAcceptPlayer(reliable, this.unreliableChannel); }