コード例 #1
0
ファイル: NetServerClient.cs プロジェクト: TraeF1337/HKMP
        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);
        }
コード例 #2
0
ファイル: NetServerClient.cs プロジェクト: Benjoby057/HKMPte
        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);
        }