TsgcWSPServer_FilesEvents › OnMessage

OnMessage Event

Fired when a plain text message is received from a client over the Files subprotocol.

Syntax

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

Default Value

Remarks

Fires after the subprotocol has decoded an incoming envelope whose method is message (typically produced by the client's WriteData). Use this event to react to application-level text notifications sent alongside file transfers.

Example

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

Back to Events