TsgcWSPClient_Files › Events › OnFragmented
Fires for every fragmented WebSocket frame passing through the Files subprotocol transport.
property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object
—
Continuation is False for the first fragment and True for subsequent ones; OpCode identifies the frame type. The subprotocol itself processes fragmented messages internally, so this event is mainly useful for diagnostics and custom handling when FragmentedMessages is set to frgOnlyFragmented.
procedure TForm1.oProtocolFragmented(Connection: TsgcWSConnection;
const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean);
begin
Memo1.Lines.Add(Format('fragment %d bytes cont=%s', [Data.Size, BoolToStr(Continuation, True)]));
end;