HslCommunication.WebSocket.WebSocketMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of HslCommunication Show documentation
Show all versions of HslCommunication Show documentation
一个工业物联网的底层架构框架,专注于底层的技术通信及跨平台,跨语言通信功能,实现各种主流的PLC数据读写,实现modbus的各种协议读写等等
package HslCommunication.WebSocket;
import HslCommunication.Utilities;
/**
* websocket 协议下的单个消息的数据对象
* Data object for a single message under the websocket protocol
*/
public class WebSocketMessage {
/**
* 是否存在掩码
* Whether a mask exists
*/
public boolean HasMask = false;
/**
* 当前的websocket的操作码
* The current websocket opcode
*/
public int OpCode = 0;
/**
* 负载数据
*/
public byte[] Payload = null;
@Override
public String toString() {
return "WebSocketMessage{" +
"HasMask=" + HasMask +
", OpCode=" + OpCode +
", Payload=" + Utilities.getString(Payload, "UTF-8") +
'}';
}
}