/// <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); }
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(); }