TsgcWSPClient_FilesEvents › OnBinary

OnBinary Event

Fires when a raw binary frame arrives through the Files subprotocol transport.

Syntax

property OnBinary: TsgcWSBinaryEvent;
// TsgcWSBinaryEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream) of object

Default Value

Remarks

The protocol already dispatches file fragments through its own OnFileReceived* chain; OnBinary is only useful when you need to inspect the raw bytes that cross the wire for logging or diagnostics.

Example

procedure TForm1.oProtocolBinary(Connection: TsgcWSConnection; const Data: TMemoryStream);
begin
  Memo1.Lines.Add(Format('binary frame: %d bytes', [Data.Size]));
end;

Back to Events