Documentation ¶
Index ¶
- func NewChain(list []iface.IInterceptor, pos int, req iface.IcReq) iface.IChain
- func NewFrameDecoder(lf iface.LengthField) iface.IFrameDecoder
- func NewFrameDecoderByParams(maxFrameLength uint64, ...) iface.IFrameDecoder
- type Chain
- func (c *Chain) GetIMessage() iface.IMessage
- func (c *Chain) Proceed(request iface.IcReq) iface.IcResp
- func (c *Chain) ProceedWithIMessage(iMessage iface.IMessage, response iface.IcReq) iface.IcResp
- func (c *Chain) Request() iface.IcReq
- func (c *Chain) ShouldIRequest(icReq iface.IcReq) iface.IRequest
- type FrameDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFrameDecoder ¶
func NewFrameDecoder(lf iface.LengthField) iface.IFrameDecoder
func NewFrameDecoderByParams ¶
func NewFrameDecoderByParams(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) iface.IFrameDecoder
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) GetIMessage ¶
GetIMessage 从Chain中获取IMessage
func (*Chain) ProceedWithIMessage ¶
Next 通过IMessage和解码后数据进入下一个责任链任务 iMessage 为解码后的IMessage response 为解码后的数据
type FrameDecoder ¶
type FrameDecoder struct { iface.LengthField //从ILengthField集成的基础属性 LengthFieldEndOffset int //长度字段结束位置的偏移量 LengthFieldOffset+LengthFieldLength // contains filtered or unexported fields }
FrameDecoder 基于LengthField模式的解码器
func (*FrameDecoder) Decode ¶
func (d *FrameDecoder) Decode(buff []byte) [][]byte
Click to show internal directories.
Click to hide internal directories.