MqttServer 属性 |
MqttServer 类型公开以下成员。
名称 | 说明 | |
---|---|---|
EnableIPv6 |
获取或设置服务器是否支持IPv6的地址协议信息 (继承自 NetworkServerBase。)Get or set whether the server supports IPv6 address protocol information | |
IsStarted |
服务器引擎是否启动 (继承自 NetworkServerBase。)Whether the server engine is started | |
LogNet |
组件的日志工具,支持日志记录,只要实例化后,当前网络的基本信息,就以DEBUG等级进行输出 (继承自 NetworkBase。)The component's logging tool supports logging. As long as the instantiation of the basic network information, the output will be output at DEBUG | |
LogStatistics |
获取当前的日志统计信息,可以获取到每个API的每天的调度次数信息,缓存60天数据,如果需要存储本地,需要调用SaveToFile(String)方法。 Get the current log statistics, you can get the daily scheduling times information of each API, and cache 60-day data. If you need to store it locally, you need to call the SaveToFile(String) method. | |
MqttOnlineSessions |
获得当前异步客户端在线的MQTT客户端信息。 Get the MQTT client information of the current asynchronous client online. | |
OnlineCount |
获取当前的在线的客户端数量 Gets the number of clients currently online | |
OnlineSessions |
获得当前所有的在线的MQTT客户端信息,包括异步的客户端及同步请求的客户端。 Obtain all current online MQTT client information, including asynchronous client and synchronous request client. | |
Port |
获取或设置服务器的端口号,如果是设置,需要在服务器启动前设置完成,才能生效。 (继承自 NetworkServerBase。)Gets or sets the port number of the server. If it is set, it needs to be set before the server starts to take effect. | |
SocketKeepAliveTime |
获取或设置客户端的Socket的心跳时间信息,这个是Socket底层自动实现的心跳包,不基于协议层实现。默认小于0,不开启心跳检测,如果需要开启,设置 60_000 比较合适,单位毫秒 (继承自 NetworkServerBase。)Get or set the heartbeat time information of the Socket of the client. This is the heartbeat packet automatically implemented by the bottom layer of the Socket, not based on the protocol layer. The default value is less than 0, and heartbeat detection is not enabled. If you need to enable it, it is more appropriate to set 60_000, in milliseconds. | |
SyncOnlineSessions |
获得当前同步客户端在线的MQTT客户端信息,如果客户端是短连接,将难以捕获在在线信息。 Obtain the MQTT client information of the current synchronization client online. If the client is a short connection, it will be difficult to capture the online information. | |
Token |
网络类的身份令牌,在hsl协议的模式下会有效,在和设备进行通信的时候是无效的 (继承自 NetworkBase。)Network-type identity tokens will be valid in the hsl protocol mode and will not be valid when communicating with the device | |
TopicStatistics |
获取或设置当前的主题统计信息,默认按照天进行统计,连续统计30天。 You can obtain or set the statistics of the current topic. By default, the statistics are collected every day for 30 consecutive days. | |
TopicWildcard |
获取或设置是否启用订阅主题通配符的功能,默认为 False Gets or sets whether to enable the function of subscribing to the topic wildcard, the default is False |