Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMsgSizeGreaterThanMaxLength = errors.New("message package size greater than max length")
Functions ¶
func NewDelimiterCodec ¶
func NewDelimiterCodec(delimiter string, maxLength uint32, ops ...Option) codec.PacketCodec
NewDelimiterCodec returns a packet codec
func NewFixedLengthCodec ¶
func NewFixedLengthCodec(length uint32) codec.PacketCodec
NewFixedLengthCodec returns a fixed length packet codec
func NewVariableLengthCodec ¶
func NewVariableLengthCodec() codec.PacketCodec
NewVariableLengthCodec returns a variable length packet codec
Types ¶
type Option ¶
type Option func(dc *delimiterCodec)
func DisableAutoAppendDelimiter ¶
func DisableAutoAppendDelimiter() Option
DisableAutoAppendDelimiter disables the behavior of automatic appends delimiter when encode
func DisableStripDelimiter ¶
func DisableStripDelimiter() Option
DisableStripDelimiter disable that strip delimiter when decode
Click to show internal directories.
Click to hide internal directories.