Esempio n. 1
0
        internal void Reset()
        {
            this.protocol = null;
            this.state    = ConnectionState.DISCONNECTED;

            this.Conn = null;
            this.Addr = null;

            this.orderedChain.Reset();
            this.sendBuffer.Reset();
            this.receiveBuffer.Reset();
            this.congestionHandler.Reset();

            this.localSequence   = 0;
            this.remoteSequence  = 0;
            this.ackBits         = 0;
            this.orderedSequence = 0;

            this.localUnreliableSequence  = 0;
            this.remoteUnreliableSequence = 0;

            this.lastAckSendTime    = 0;
            this.lastResendTime     = 0;
            this.lastReceivedTime   = 0;
            this.lastChainTime      = 0;
            this.pingPacketInterval = 0;

            this.sendQueue.Clear();
            this.values.Clear();
        }
Esempio n. 2
0
        internal void Init(RMNP impl, IPEndPoint addr)
        {
            this.protocol = impl;
            this.Conn     = impl.Socket;
            this.Addr     = addr;
            this.state    = ConnectionState.CONNECTING;

            long t = Util.CurrentTime();

            this.lastAckSendTime  = t;
            this.lastResendTime   = t;
            this.lastReceivedTime = t;
        }