goframe icon indicating copy to clipboard operation
goframe copied to clipboard

关于LengthFieldBasedFrame的困惑

Open supermario1990 opened this issue 3 years ago • 1 comments

我把example中的例子改成下面这样为啥就跑不通了呢?希望鸟哥解惑下

encoderConfig := goframe.EncoderConfig{
		ByteOrder:                       binary.BigEndian,
		LengthFieldLength:               2,
		LengthAdjustment:                -2,
		LengthIncludesLengthFieldLength: false,
	}

	decoderConfig := goframe.DecoderConfig{
		ByteOrder:           binary.BigEndian,
		LengthFieldOffset:   0,
		LengthFieldLength:   2,
		LengthAdjustment:    -2,
		InitialBytesToStrip: 0,
	}

supermario1990 avatar Oct 29 '20 15:10 supermario1990

@supermario1990 你去看下源码怎么实现的就知道了

jidibinlin avatar Sep 11 '22 15:09 jidibinlin