packetdata

package module
v0.0.0-...-042ca66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PacketData

type PacketData struct {
	Buf []byte
	// contains filtered or unexported fields
}

func New

func New(buf []byte) (pds *PacketData)

func (*PacketData) CopyBytes

func (pds *PacketData) CopyBytes(dst []byte)

Copy a buffer out of the PacketData into dst.

func (*PacketData) GetFloat32

func (pds *PacketData) GetFloat32() float32

GetFloat32 reads a float32 from the PacketData

func (*PacketData) GetFloat64

func (pds *PacketData) GetFloat64() float64

GetFloat64 reads a float64 from the PacketData.

func (*PacketData) GetInt16

func (pds *PacketData) GetInt16() int16

GetInt16 reads a int16 from the PacketData

func (*PacketData) GetInt32

func (pds *PacketData) GetInt32() int32

GetInt32 reads a int32 from the PacketData

func (*PacketData) GetInt64

func (pds *PacketData) GetInt64() int64

GetInt64 reads a int64 from the PacketData

func (*PacketData) GetInt8

func (pds *PacketData) GetInt8() int8

GetInt8 reads a int8 from the PacketData

func (*PacketData) GetUint16

func (pds *PacketData) GetUint16() uint16

GetUint16 reads a uint16 from the PacketData

func (*PacketData) GetUint32

func (pds *PacketData) GetUint32() uint32

GetUint32 reads a uint32 from the PacketData

func (*PacketData) GetUint64

func (pds *PacketData) GetUint64() uint64

GetUint64 reads a uint64 from the PacketData

func (*PacketData) GetUint8

func (pds *PacketData) GetUint8() uint8

GetUint8 reads a uint8 from the PacketData

func (*PacketData) IsValid

func (pds *PacketData) IsValid() bool

func (*PacketData) Left

func (pds *PacketData) Left() int

Left returns number of bytes remaining in the buffer.

func (*PacketData) Next8

func (pds *PacketData) Next8() (ret uint8)

Next8 gets the next byte from the PacketData as a byte (uint8)

func (*PacketData) PutBytes

func (pds *PacketData) PutBytes(src []byte)

Put a buffer src into the PacketData at the current offset.

func (*PacketData) PutFloat32

func (pds *PacketData) PutFloat32(val float32)

PutFloat32 writes a float32 to the PacketData

func (*PacketData) PutFloat64

func (pds *PacketData) PutFloat64(val float64)

PutFloat64 writes a float64 to the PacketData

func (*PacketData) PutInt16

func (pds *PacketData) PutInt16(val int16)

PutInt16 writes a int16 to the PacketData

func (*PacketData) PutInt32

func (pds *PacketData) PutInt32(val int32)

PutInt32 writes a int32 to the PacketData

func (*PacketData) PutInt64

func (pds *PacketData) PutInt64(val int64)

PutInt64 writes a int64 to the PacketData

func (*PacketData) PutInt8

func (pds *PacketData) PutInt8(val int8)

PutInt8 writes a int8 to the PacketData

func (*PacketData) PutUint16

func (pds *PacketData) PutUint16(val uint16)

PutUint16 writes a uint16 to the PacketData

func (*PacketData) PutUint32

func (pds *PacketData) PutUint32(val uint32)

PutUint32 writes a uint32 to the PacketData

func (*PacketData) PutUint64

func (pds *PacketData) PutUint64(val uint64)

PutUint64 writes a uint64 to the PacketData

func (*PacketData) PutUint8

func (pds *PacketData) PutUint8(val uint8)

PutUint8 writes a uint8 to the PacketData

func (*PacketData) Size

func (pds *PacketData) Size() int

Size returns the size of the currently-assembled data stream

func (*PacketData) Skip

func (pds *PacketData) Skip(skip int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL