StartConnectionTimer() private method

private StartConnectionTimer ( ) : void
return void
Esempio n. 1
0
        private void SendConnectAccept(NetPeer peer, ulong id)
        {
            //Reset connection timer
            peer.StartConnectionTimer();

            //Make initial packet
            var connectPacket = NetPacket.CreateRawPacket(PacketProperty.ConnectAccept, 8);

            //Add data
            FastBitConverter.GetBytes(connectPacket, 1, id);

            //Send raw
            SendRaw(connectPacket, peer.EndPoint);
        }
Esempio n. 2
0
        private void ProcessConnectAccept()
        {
            if (_connected)
            {
                return;
            }

            NetUtils.DebugWrite(ConsoleColor.Cyan, "[NC] Received connection accept");
            _connected = true;
            var connectEvent = CreateEvent(NetEventType.Connect);

            connectEvent.Peer = _peer;
            EnqueueEvent(connectEvent);
            _peer.StartConnectionTimer();
        }
Esempio n. 3
0
        private void SendConnectAccept(NetPeer peer, ulong id)
        {
            //Reset connection timer
            peer.StartConnectionTimer();

            //Make initial packet
            var connectPacket = NetPacket.CreateRawPacket(PacketProperty.ConnectAccept, 8);

            //Add data
            FastBitConverter.GetBytes(connectPacket, 1, id);

            //Send raw
            SendRaw(connectPacket, peer.EndPoint);
        }