Ejemplo n.º 1
0
            /// <summary>
            ///     Returns this object back to the object pool from whence it came.
            /// </summary>
            public void Recycle()
            {
                this.Acknowledged = true;
                this.Connection   = null;

                PacketPool.PutObject(this);
            }
Ejemplo n.º 2
0
            internal void Set(ushort id, UdpConnection connection, byte[] data, int length, int timeout, Action ackCallback)
            {
                this.Id         = id;
                this.Data       = data;
                this.Connection = connection;
                this.Length     = length;

                this.Acknowledged    = false;
                this.NextTimeout     = timeout;
                this.AckCallback     = ackCallback;
                this.Retransmissions = 0;

                this.Stopwatch.Restart();
            }