zcode

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInterceptorBuilder

func NewInterceptorBuilder() ziface.InterceptorBuilder

func NewLengthFieldFrameDecoder

func NewLengthFieldFrameDecoder(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) ziface.ILengthField

func NewLengthFieldFrameDecoderByLengthField

func NewLengthFieldFrameDecoderByLengthField(lengthField ziface.LengthField) ziface.ILengthField

func NewRealInterceptorChain

func NewRealInterceptorChain(list []ziface.Interceptor, pos int, request ziface.Request) ziface.Chain

Types

type EncoderData

type EncoderData struct {
	LengthFieldEndOffset int //长度字段结束位置的偏移量  LengthFieldOffset+LengthFieldLength
	// contains filtered or unexported fields
}

func (*EncoderData) Decode

func (this *EncoderData) Decode(buff []byte) [][]byte

type InterceptorChain

type InterceptorChain struct {
	// contains filtered or unexported fields
}

InterceptorChain HTLV+CRC,H头码,T功能码,L数据长度,V数据内容 +------+-------+---------+--------+--------+ | 头码 | 功能码 | 数据长度 | 数据内容 | CRC校验 | | 1字节 | 1字节 | 1字节 | N字节 | 2字节 | +------+-------+---------+--------+--------+

func (*InterceptorChain) AddInterceptor

func (this *InterceptorChain) AddInterceptor(interceptor ziface.Interceptor)

func (*InterceptorChain) Execute

func (this *InterceptorChain) Execute(request ziface.Request) ziface.Response

type LengthFieldFrameInterceptor

type LengthFieldFrameInterceptor struct {
	// contains filtered or unexported fields
}

func NewLengthFieldFrameInterceptor

func NewLengthFieldFrameInterceptor(maxFrameLength uint64, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip int) *LengthFieldFrameInterceptor

func (*LengthFieldFrameInterceptor) Intercept

func (this *LengthFieldFrameInterceptor) Intercept(chain ziface.Chain) ziface.Response

type RealInterceptorChain

type RealInterceptorChain struct {
	// contains filtered or unexported fields
}

func (*RealInterceptorChain) Proceed

func (this *RealInterceptorChain) Proceed(request ziface.Request) ziface.Response

func (*RealInterceptorChain) Request

func (this *RealInterceptorChain) Request() ziface.Request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL