点击或拖拽改变大小

MqttConnectionOptionsCleanSession 属性

是否清理会话,如果清理会话(CleanSession)标志被设置为1,客户端和服务端必须丢弃之前的任何会话并开始一个新的会话。 会话仅持续和网络连接同样长的时间。与这个会话关联的状态数据不能被任何之后的会话重用 [MQTT-3.1.2-6]。默认为清理会话。
Whether to clean the session. If the CleanSession flag is set to 1, the client and server must discard any previous session and start a new session. The session only lasts as long as the network connection. The state data associated with this session cannot be reused by any subsequent sessions [MQTT-3.1.2-6]. The default is to clean up the session.

命名空间:  HslCommunication.MQTT
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public bool CleanSession { get; set; }

属性值

类型:Boolean
参见