TsgcWSPClient_MQTT › Methods › WriteData
Writes a pre-built MQTT control packet directly over the WebSocket transport.
procedure WriteData(const aText: String);
| Name | Type | Description |
|---|---|---|
aText | const String | Raw payload to transmit inside a binary WebSocket frame. Typically a hex-encoded MQTT packet produced by an external encoder. |
Advanced, low-level escape hatch for sending experimental or vendor-specific MQTT packets that the high-level API does not expose. The text is sent verbatim after hex-decoding, bypassing packet-id tracking, flow control and QoS bookkeeping. Misuse can desynchronise the session; prefer Publish, Subscribe, UnSubscribe, Disconnect or Auth whenever possible.
// send a crafted MQTT PINGREQ (0xC0 0x00)
MQTT.WriteData('C000');