Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPacketConn ¶
func NewPacketConn(pc net.PacketConn, p Protocol) net.PacketConn
NewPacketConn returns a net.NewPacketConn with protocol decoding/encoding
Types ¶
type PacketConn ¶
type PacketConn struct { net.PacketConn Protocol }
PacketConn represents a protocol packet connection
type Protocol ¶
type Protocol interface { GetProtocolOverhead() int SetOverhead(int) Decode([]byte) ([]byte, int, error) Encode([]byte) ([]byte, error) DecodePacket([]byte) ([]byte, int, error) EncodePacket([]byte) ([]byte, error) // contains filtered or unexported methods }
Protocol provides methods for decoding, encoding and iv setting
Click to show internal directories.
Click to hide internal directories.