public interface INetMessage
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
CheckHeadBytesLegal(byte[] token)
检查头子节的合法性
Check the legitimacy of the head subsection
|
byte[] |
getContentBytes()
获取消息内容字节
Get Message content byte
|
int |
GetContentLengthByHeadBytes()
从当前的头子节文件中提取出接下来需要接收的数据长度
Extract the length of the data to be received from the current header file
|
byte[] |
getHeadBytes()
获取消息头字节
Get Message header byte
|
int |
GetHeadBytesIdentity()
获取头子节里的消息标识
Get the message ID in the header subsection
|
byte[] |
getSendBytes()
获取发送的消息
Get Byte information sent
|
int |
PependedUselesByteLength(byte[] headByte)
在接收头报文的时候,返回前置无效的报文头字节长度,默认为0,不处理
When receiving a header message, return the header byte length of the invalid header, the default is 0, and no processing is performed. |
int |
ProtocolHeadBytesLength()
消息头的指令长度,第一次接受数据的长度
Instruction length of the message header, the length of the first received data
|
void |
setContentBytes(byte[] contentBytes)
设置消息内容字节
Set Message content byte
|
void |
setHeadBytes(byte[] headBytes)
设置消息头子节
Set Message header byte
|
void |
setSendBytes(byte[] sendBytes)
设置发送的字节信息
Set Byte information sent
|
int ProtocolHeadBytesLength()
int GetContentLengthByHeadBytes()
boolean CheckHeadBytesLegal(byte[] token)
token - 特殊的令牌,有些特殊消息的验证int PependedUselesByteLength(byte[] headByte)
headByte - 接收到的头子节信息int GetHeadBytesIdentity()
void setHeadBytes(byte[] headBytes)
headBytes - 字节数据byte[] getHeadBytes()
byte[] getContentBytes()
void setContentBytes(byte[] contentBytes)
contentBytes - 内容字节byte[] getSendBytes()
void setSendBytes(byte[] sendBytes)
sendBytes - 发送的字节信息Copyright © 2022. All rights reserved.