public NetServerClient(ushort id, TcpClient tcpClient) { _id = id; // Also store endpoint with TCP address and TCP port _endPoint = (IPEndPoint)tcpClient.Client.RemoteEndPoint; _tcpNetClient = new TcpNetClient(); _tcpNetClient.InitializeWithClient(tcpClient); _tcpNetClient.RegisterOnReceive(OnReceiveData); }
public NetServerClient(ushort id, TcpClient tcpClient, UdpClient udpClient) { _id = id; // Also store endpoint with TCP address and TCP port _endPoint = (IPEndPoint)tcpClient.Client.RemoteEndPoint; _tcpNetClient = new TcpNetClient(); _tcpNetClient.InitializeWithClient(tcpClient); UpdateManager = new ServerUpdateManager(udpClient, _endPoint); }