TsgcWSPClient_MQTT › Methods › Connect
Sends an MQTT CONNECT packet to the broker over the underlying WebSocket transport.
procedure Connect;
Call Connect once the parent WebSocket client is already connected, to initiate the MQTT-level handshake using the configured Client, Authentication, HeartBeat, LastWillTestament and ConnectProperties. The method returns immediately; the broker's CONNACK is reported asynchronously through the OnMQTTConnect event. Use OnMQTTBeforeConnect to tweak the CONNECT packet just before it is written.
WSClient.Active := True;
MQTT.Connect;