Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxDatagramSize = 1420 HeadSize = 12 MaxChunkSize = MaxDatagramSize - HeadSize MaxChunks = 128 MaxMessageSize = MaxChunkSize * MaxChunks CompressionNone = 0 CompressionGzip = 1 CompressionZlib = 2 )
Variables ¶
View Source
var ErrTooLargeMessageSize = errors.New("too large message size")
View Source
var Magic = []byte{0x1e, 0x0f}
Functions ¶
Types ¶
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
func NewCompressor ¶
func NewCompressor(compressionType string, compressionLevel int) (*Compressor, error)
type DefaultIdGenerator ¶
type DefaultIdGenerator struct {
// contains filtered or unexported fields
}
func NewDefaultIdGenerator ¶
func NewDefaultIdGenerator(ip uint64) *DefaultIdGenerator
func (*DefaultIdGenerator) NextId ¶
func (g *DefaultIdGenerator) NextId() uint64
type IdGenerator ¶
type IdGenerator interface {
NextId() uint64
}
type UDPSender ¶
type UDPSender struct {
// contains filtered or unexported fields
}
func NewUDPSender ¶
Click to show internal directories.
Click to hide internal directories.