点击或拖拽改变大小

WebSocketClient 属性

WebSocketClient 类型公开以下成员。

属性
  名称说明
公共属性ConnectTimeOut
获取或设置当前客户端的连接超时时间,默认10,000毫秒,单位ms
Gets or sets the connection timeout of the current client. The default is 10,000 milliseconds. The unit is ms.
公共属性IpAddress
Mqtt服务器的ip地址
IP address of Mqtt server
公共属性IsClosed
获取当前的客户端状态是否关闭了连接,当自己手动处理网络异常事件的时候,在重连之前就需要判断是否关闭了连接。
Obtain whether the current client status has closed the connection. When manually handling network abnormal events, you need to determine whether the connection is closed before reconnecting.
公共属性代码示例LogNet
组件的日志工具,支持日志记录,只要实例化后,当前网络的基本信息,就以DEBUG等级进行输出
The component's logging tool supports logging. As long as the instantiation of the basic network information, the output will be output at DEBUG
(继承自 NetworkBase。)
公共属性Port
端口号。默认1883
The port number. Default 1883
公共属性代码示例Token
网络类的身份令牌,在hsl协议的模式下会有效,在和设备进行通信的时候是无效的
Network-type identity tokens will be valid in the hsl protocol mode and will not be valid when communicating with the device
(继承自 NetworkBase。)
Top
参见