(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int)
| 338 | } |
| 339 | |
| 340 | func 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 | |
| 351 | func (d *FrameDecoder) fail(frameLength int64) { |
| 352 | //丢弃完成或未完成都抛异常 |
nothing calls this directly
no test coverage detected