Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDynamicJT1078Receiver ¶ added in v1.5.5
func NewDynamicJT1078Receiver(startBf []byte) netInterface.IReceiver
实例化
func NewDynamicSpliceSymbol ¶ added in v1.1.1
func NewDynamicSpliceSymbol(startSymbol byte, finishSymbol byte) netInterface.IReceiver
实例化
Types ¶
type DynamicJT1078Receiver ¶ added in v1.5.5
type DynamicJT1078Receiver struct { JT1078Receiver *JT1078Receiver // contains filtered or unexported fields }
单字节策略
func (*DynamicJT1078Receiver) IsMeHandle ¶ added in v1.5.5
func (d *DynamicJT1078Receiver) IsMeHandle(conn netInterface.IConnection, buffer []byte) bool
是否我处理
func (*DynamicJT1078Receiver) Receiver ¶ added in v1.5.5
func (d *DynamicJT1078Receiver) Receiver(conn netInterface.IConnection, buffer []byte) ([]byte, int)
分包处理[处理一包后跳出]
type DynamicReceiver ¶
type DynamicReceiver struct { Receivers []netInterface.IReceiver //分包器集合 ReceiverLen int //分包器个数 IsPackStart bool //是否开始分包 IsSingle bool //是否只有一个分包算法 // contains filtered or unexported fields }
策略分包器
func (*DynamicReceiver) Receiver ¶
func (d *DynamicReceiver) Receiver(conn netInterface.IConnection, buffer []byte) (err error)
分包处理
type DynamicSpliceSymbol ¶ added in v1.1.1
type DynamicSpliceSymbol struct { *SpliceSymbolReceiver // contains filtered or unexported fields }
单字节策略
func (*DynamicSpliceSymbol) IsMeHandle ¶ added in v1.1.1
func (d *DynamicSpliceSymbol) IsMeHandle(conn netInterface.IConnection, buffer []byte) bool
是否我处理
func (*DynamicSpliceSymbol) Receiver ¶ added in v1.1.1
func (d *DynamicSpliceSymbol) Receiver(conn netInterface.IConnection, buffer []byte) ([]byte, int)
分包处理[处理一包后跳出]
type JT1078Receiver ¶ added in v1.5.5
type JT1078Receiver struct {
// contains filtered or unexported fields
}
JT1078分包器
func NewJT1078Receiver ¶ added in v1.5.5
func NewJT1078Receiver(startBf []byte) *JT1078Receiver
按照开始结束符来粘包
func (*JT1078Receiver) Receiver ¶ added in v1.5.5
func (j *JT1078Receiver) Receiver(conn netInterface.IConnection, buffer []byte) ([]byte, int)
分包逻辑
type SpliceSymbolReceiver ¶
type SpliceSymbolReceiver struct {
// contains filtered or unexported fields
}
/ 按照开始结束符来粘包(单字节版)
func NewSpliceSymbolReceiver ¶
func NewSpliceSymbolReceiver(startSymbol byte, finishSymbol byte) *SpliceSymbolReceiver
按照开始结束符来粘包
func (*SpliceSymbolReceiver) Receiver ¶
func (s *SpliceSymbolReceiver) Receiver(conn netInterface.IConnection, buffer []byte) ([]byte, int)
分包逻辑
Click to show internal directories.
Click to hide internal directories.