utils

package
v0.0.0-...-2c9eac5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MyPutUint32

func MyPutUint32(wire []byte, dat uint32, size int) int

func MyPutUint64

func MyPutUint64(wire []byte, dat uint64, size int) int

func MyUint32

func MyUint32(wire []byte, frameLen int) (buff uint32)

func MyUint64

func MyUint64(wire []byte, frameLen int) (buff uint64)

Types

type MaxHeapUint64

type MaxHeapUint64 []uint64

func (*MaxHeapUint64) Delete

func (h *MaxHeapUint64) Delete()

func (MaxHeapUint64) Len

func (h MaxHeapUint64) Len() int

func (MaxHeapUint64) Less

func (h MaxHeapUint64) Less(i, j int) bool

func (*MaxHeapUint64) Pop

func (h *MaxHeapUint64) Pop() interface{}

func (*MaxHeapUint64) Push

func (h *MaxHeapUint64) Push(x interface{})

func (MaxHeapUint64) Swap

func (h MaxHeapUint64) Swap(i, j int)

type RingBuffer

type RingBuffer struct {
	// contains filtered or unexported fields
}

RingBuffer is just a ring buffer

func NewRingBuffer

func NewRingBuffer(size int) *RingBuffer

func (*RingBuffer) DeleteAll

func (rb *RingBuffer) DeleteAll()

func (*RingBuffer) Dequeue

func (rb *RingBuffer) Dequeue() interface{}

func (RingBuffer) Empty

func (rb RingBuffer) Empty() bool

func (*RingBuffer) Enqueue

func (rb *RingBuffer) Enqueue(item interface{})

func (RingBuffer) Full

func (rb RingBuffer) Full() bool

func (RingBuffer) Size

func (rb RingBuffer) Size() int

type StreamData

type StreamData struct {
	Offset uint64
	Data   []byte
}

used for RecvStream's data reordering

Jump to

Keyboard shortcuts

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