TsgcWSPClient_Dataset › Events › OnBinary
Fires when a binary frame arrives; payload is delivered as a TMemoryStream.
property OnBinary: TsgcWSBinaryEvent;
// TsgcWSBinaryEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream) of object
—
Data owns the payload and is valid only during the handler. Copy its contents before the handler returns if you need to process the bytes later.
procedure TForm1.oProtocolBinary(Connection: TsgcWSConnection; const Data: TMemoryStream);
begin
Memo1.Lines.Add(Format('binary: %d bytes', [Data.Size]));
end;