func (l *PacketList) PushFront(v Packet) *PacketElement {
	l.lazyInit()
	return l.insertValue(v, &l.root)
}
PushFront inserts a new element e with value v at the front of list l and returns e.
package ackhandler
type PacketElement struct {
	next, prev *PacketElement
	list *PacketList
	Value Packet
}
func (e *PacketElement) Next() *PacketElement {
	if p := e.next; e.list != nil && p != &e.list.root {
		return p
	}
	return nil
}
func (e *PacketElement) Prev() *PacketElement {
	if p := e.prev; e.list != nil && p != &e.list.root {
		return p
	}
	return nil
}
type PacketList struct {
	root PacketElement  
	len  int            
}
func (l *PacketList) Init() *PacketList {
	l.root.next = &l.root
	l.root.prev = &l.root
	l.len = 0
	return l
}
func NewPacketList() *PacketList { return new(PacketList).Init() }
func (l *PacketList) Len() int { return l.len }
func (l *PacketList) Front() *PacketElement {
	if l.len == 0 {
		return nil
	}
	return l.root.next
}
func (l *PacketList) Back() *PacketElement {
	if l.len == 0 {
		return nil
	}
	return l.root.prev
}
func (l *PacketList) lazyInit() {
	if l.root.next == nil {
		l.Init()
	}
}
func (l *PacketList) insert(e, at *PacketElement) *PacketElement {
	n := at.next
	at.next = e
	e.prev = at
	e.next = n
	n.prev = e
	e.list = l
	l.len++
	return e
}
func (l *PacketList) insertValue(v Packet, at *PacketElement) *PacketElement {
	return l.insert(&PacketElement{Value: v}, at)
}
func (l *PacketList) remove(e *PacketElement) *PacketElement {
	e.prev.next = e.next
	e.next.prev = e.prev
	e.next = nil  
	e.prev = nil  
	e.list = nil
	l.len--
	return e
}
func (l *PacketList) Remove(e *PacketElement) Packet {
	if e.list == l {
		l.remove(e)
	}
	return e.Value
}