Documentation
¶
Index ¶
- Constants
- Variables
- type Buffer
- func (b *Buffer) Advance(add int) bool
- func (b *Buffer) Bool() bool
- func (b *Buffer) Byte() byte
- func (b *Buffer) Clear()
- func (b *Buffer) Finished() bool
- func (b *Buffer) Float32() float32
- func (b *Buffer) Float64() float64
- func (b *Buffer) Int() int
- func (b *Buffer) Int16() int16
- func (b *Buffer) Int32() int32
- func (b *Buffer) Int64() int64
- func (b *Buffer) PutBool(input bool)
- func (b *Buffer) PutFloat32(input float32) error
- func (b *Buffer) PutFloat64(input float64) error
- func (b *Buffer) PutInt(input int)
- func (b *Buffer) PutInt16(input int16)
- func (b *Buffer) PutInt32(input int32)
- func (b *Buffer) PutInt64(input int64)
- func (b *Buffer) PutString(input string)
- func (b *Buffer) PutUint(input uint)
- func (b *Buffer) PutUint16(input uint16)
- func (b *Buffer) PutUint32(input uint32)
- func (b *Buffer) PutUint64(input uint64)
- func (b *Buffer) PutVec(input mat.Vec)
- func (b *Buffer) String() string
- func (b *Buffer) Uint() uint
- func (b *Buffer) Uint16() uint16
- func (b *Buffer) Uint32() uint32
- func (b *Buffer) Uint64() uint64
- func (b *Buffer) Vec() mat.Vec
- type Reader
- type Writer
Constants ¶
View Source
const ( Byte = 1 Uint16 = 2 Uint32 = 4 Uint64 = 8 Uint = 8 Int8 = 1 Int16 = 2 Int32 = 4 Int64 = 8 Int = 8 Float32 = 4 Float64 = 8 )
Size stores byte sizes of types
Variables ¶
View Source
var ByteType = reflect.TypeOf(byte(0))
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
Buffer si for marshaling Data into bites
func (*Buffer) Advance ¶
Advance shifts a Buffer cursor by value and reports if operation failed (true if failed)
func (*Buffer) Clear ¶
func (b *Buffer) Clear()
Clear puts buffer to its default value, except Data, that is just truncated to 0 len
func (*Buffer) PutFloat32 ¶
PutFloat32 writes float32 to Buffer
func (*Buffer) PutFloat64 ¶
PutFloat64 writes float64 to Buffer
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader handles splitting of incoming packets into separate Buffers, assuming that Buffers were put together by Builder
Click to show internal directories.
Click to hide internal directories.