TsgcWSPServer_Files › Events › OnBinary
Fired when a raw binary frame is received from a client.
property OnBinary: TsgcWSBinaryEvent;
// TsgcWSBinaryEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream) of object
—
The Files subprotocol consumes binary frames to reassemble incoming files, so this event is normally only useful for diagnostics. The Data stream position is at zero and is valid for the duration of the callback.
procedure TForm1.oFilesBinary(Connection: TsgcWSConnection; const Data: TMemoryStream);
begin
Memo1.Lines.Add(Format('binary frame: %d bytes', [Data.Size]));
end;