Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct { Header ChunkHeader Data []byte }
func UnpackChunks ¶
data has to be the uncompressed payload of a teeworlds packet without the packet header
It will return all the chunks (messages) in that packet
type ChunkFlags ¶
func (*ChunkFlags) ToInt ¶
func (flags *ChunkFlags) ToInt() int
type ChunkHeader ¶
type ChunkHeader struct { Flags ChunkFlags Size int // sequence number // will be acknowledged in the packet header ack Seq int }
func (*ChunkHeader) Pack ¶
func (header *ChunkHeader) Pack() []byte
func (*ChunkHeader) UnpackRaw ¶
func (header *ChunkHeader) UnpackRaw(data []byte) error
TODO: give this a better name
but it would be nice to have two unpack methods for all structs Unpack(u *packer.Unpacker) UnpackTodoFindAGoodName(data []byte) See https://github.com/teeworlds-go/protocol/issues/5
Click to show internal directories.
Click to hide internal directories.