TsgcWSPClient_DatasetEvents › OnMessage

OnMessage Event

Fires when a plain text message arrives on the sgc channel.

Syntax

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

Default Value

Remarks

Delivered when the server sends a plain message (for example the result of WriteData on the server side) or when another client broadcasts without a channel filter. Dataset-specific messages are routed to the OnBeforeDatasetUpdate / OnMetaData / synchronization events instead; for channel publications use OnEvent.

Example

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

Back to Events