KeepAlivePeriod property
Gets or sets the keep alive time period. Read/write. Long.
Syntax
connOption
.KeepAlivePeriod
where
connOption
- is an MQTTConnectOption object created by the MQTTFactory object's method CreateConnectOption
.Default value
If this property is omitted, it will use its default value, which is 60 seconds.
When a client establishes a connection with an MQTT broker, it negotiates a keep alive value, which is a time interval expressed in seconds. The client must send a PINGREQ packet to the broker at least once within this interval to indicate its presence and keep the connection alive. Upon receiving a PINGREQ packet, the broker responds with a PINGRESP packet, confirming that the connection is still active.
Provide Feedback