Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FieldLength field length bytes FieldLength = 4 // DefaultMaxBodySize max default body size, 10M DefaultMaxBodySize = 1024 * 1024 * 10 )
Variables ¶
This section is empty.
Functions ¶
func NewWithSize ¶
func NewWithSize(baseEncoder codec.Encoder, baseDecoder codec.Decoder, lengthFieldOffset, lengthAdjustment, initialBytesToStrip, maxBodySize int) (codec.Encoder, codec.Decoder)
NewWithSize create IntLengthFieldBased codec initialBytesToStrip + lengthFieldOffset + 4(length) lengthAdjustment, some case as below: 1. 0 : base decoder received: body 2. -4: base decoder received: 4(length) + body 3. -(4 + lengthFieldOffset): base decoder received: lengthFieldOffset + 4(length) + body 4. -(4 + lengthFieldOffset + initialBytesToStrip): base decoder received: initialBytesToStrip + lengthFieldOffset + 4(length)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.