Documentation
¶
Index ¶
- func NewBuilder() ziface.IBuilder
- func NewChain(list []ziface.IInterceptor, pos int, req ziface.IcReq) ziface.IChain
- func NewFrameDecoder(lf ziface.LengthField) ziface.IFrameDecoder
- func NewFrameDecoderByParams(maxFrameLength uint64, ...) ziface.IFrameDecoder
- func NewInterceptor(maxFrameLength uint64, ...) ziface.IInterceptor
- type Builder
- type Chain
- type FrameDecoder
- type Interceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuilder ¶
func NewFrameDecoder ¶
func NewFrameDecoder(lf ziface.LengthField) ziface.IFrameDecoder
func NewFrameDecoderByParams ¶
func NewFrameDecoderByParams(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) ziface.IFrameDecoder
func NewInterceptor ¶
func NewInterceptor(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) ziface.IInterceptor
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder 责任链构造器
func (*Builder) AddInterceptor ¶
func (ic *Builder) AddInterceptor(interceptor ziface.IInterceptor)
func (*Builder) Head ¶
func (ic *Builder) Head(interceptor ziface.IInterceptor)
func (*Builder) Tail ¶
func (ic *Builder) Tail(interceptor ziface.IInterceptor)
type FrameDecoder ¶
type FrameDecoder struct { ziface.LengthField //从ILengthField集成的基础属性 LengthFieldEndOffset int //长度字段结束位置的偏移量 LengthFieldOffset+LengthFieldLength // contains filtered or unexported fields }
FrameDecoder 基于LengthField模式的解码器
func (*FrameDecoder) Decode ¶
func (d *FrameDecoder) Decode(buff []byte) [][]byte
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor 基于LengthField规则的拦截器
Click to show internal directories.
Click to hide internal directories.