Documentation ¶
Overview ¶
Package respool contains the Dispatcher's pool of free buffers/packets.
FIXME(scrye): Currently the pools are elastic, but this is not ideal for traffic bursts. Consider converting these to fixed-size lists.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Packet ¶
type Packet struct { Info spkt.ScnPkt OverlayRemote *net.UDPAddr // contains filtered or unexported fields }
Packet describes a SCION packet. Fields might reference each other (including hidden fields), so callers should only write to freshly created packets, and readers should take care never to mutate data.
func (*Packet) DecodeFromConn ¶
func (pkt *Packet) DecodeFromConn(conn net.PacketConn) error
func (*Packet) DecodeFromReliableConn ¶
func (pkt *Packet) DecodeFromReliableConn(conn net.PacketConn) error
func (*Packet) Dup ¶
func (pkt *Packet) Dup()
Dup increases pkt's reference count.
Dup panics if it is called after the packet has been freed (i.e., it's reference count reached 0).
Modifying a packet after the first call to Dup is racy, and callers should use external locking for it.
func (*Packet) Free ¶
func (pkt *Packet) Free()
Free releases a reference to the packet. Free is safe to use from concurrent goroutines.