点击或拖拽改变大小

WebSocketHelperBuildWsSubRequest 方法

创建连接服务器的http请求,输入订阅的主题信息

命名空间:  HslCommunication.WebSocket
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.5.3.0 (12.5.3.0)
语法
public static byte[] BuildWsSubRequest(
	string ipAddress,
	int port,
	string url,
	string[] subscribes,
	bool getCarryHostAndPort,
	bool messageDeflate
)

参数

ipAddress
类型:SystemString
远程服务器的ip地址
port
类型:SystemInt32
远程服务器的端口号
url
类型:SystemString
参数信息
subscribes
类型:SystemString
通知hsl的服务器,需要订阅的topic信息
getCarryHostAndPort
类型:SystemBoolean
GET命令是否携带 Host 信息。
messageDeflate
类型:SystemBoolean
是否支持数据压缩解压操作

返回值

类型:Byte
报文信息
参见