TsgcWSPServer_Files › Methods › WriteData
Sends a plain text message to a connected client wrapped in the Files subprotocol envelope.
function WriteData(aGuid, aMessage: string): Boolean;
| Name | Type | Description |
|---|---|---|
aGuid | string | Guid of the target client connection. |
aMessage | string | Text payload to deliver to the client. |
True when the message was queued for the connection; False when the target connection was not found. (Boolean)
The text is wrapped in the Files subprotocol message envelope (method message) so it is surfaced to the client's OnMessage event rather than to the underlying TsgcWebSocketServer. Use this to send control or application-level notifications while a file transfer is in flight.
oFiles.WriteData(aConnection.Guid, 'transfer paused');