TsgcWSPClient_sgcMethods › WriteData

WriteData Method

Sends a plain text message to the server using the sgc message envelope.

Syntax

procedure WriteData(const aText: String);

Parameters

NameTypeDescription
aTextconst StringText payload to send to the server.

Remarks

Wraps the payload in the sgc message envelope (method=message) and sends it to the server, which re-raises it through OnMessage on the server side. Unlike Publish and Broadcast, WriteData targets the server itself and does not involve subscribers.

Example

oProtocol.WriteData('ping');

Back to Methods