TsgcWSPClient_FilesEvents › OnMessage

OnMessage Event

Fires when a plain text message arrives inside a Files subprotocol envelope.

Syntax

property OnMessage: TsgcWSMessageEvent;
// TsgcWSMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string) of object

Default Value

Remarks

Delivered when the server (or another subprotocol component sharing the broker) sends a plain message through WriteData. File transfers do not use this event; they raise OnFileReceived* instead.

Example

procedure TForm1.oProtocolMessage(Connection: TsgcWSConnection; const Text: string);
begin
  Memo1.Lines.Add('message: ' + Text);
end;

Back to Events