MCPcopy
hub / github.com/aceld/zinx / NewFrameDecoderByParams

Function NewFrameDecoderByParams

zinterceptor/framedecoder.go:340–349  ·  view source on GitHub ↗
(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int)

Source from the content-addressed store, hash-verified

338}
339
340func NewFrameDecoderByParams(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) ziface.IFrameDecoder {
341 return NewFrameDecoder(ziface.LengthField{
342 MaxFrameLength: maxFrameLength,
343 LengthFieldOffset: lengthFieldOffset,
344 LengthFieldLength: lengthFieldLength,
345 LengthAdjustment: lengthAdjustment,
346 InitialBytesToStrip: initialBytesToStrip,
347 Order: binary.BigEndian,
348 })
349}
350
351func (d *FrameDecoder) fail(frameLength int64) {
352 //丢弃完成或未完成都抛异常

Callers

nothing calls this directly

Calls 1

NewFrameDecoderFunction · 0.85

Tested by

no test coverage detected