TsgcWSPClient_MQTTMethods › Ping

Ping Method

Sends a PINGREQ control packet so the broker knows the session is still alive.

Syntax

procedure Ping;

Remarks

The component already pings automatically according to the HeartBeat interval negotiated during Connect, so explicit calls are only needed for diagnostics or when HeartBeat is disabled. The broker's PINGRESP is surfaced through the OnMQTTPing event. If no response is received within the keep-alive window the transport will be dropped.

Example

MQTT.Ping;

Back to Methods