TsgcWSPClient_Dataset › Events › OnFragmented
Fires for fragmented WebSocket frames, exposing OpCode and continuation flag.
property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object
—
Triggered once per fragment when the server sends a message that is split across several frames. OpCode identifies whether the fragment is text or binary; Continuation is True while more fragments are expected and False on the final fragment.
procedure TForm1.oProtocolFragmented(Connection: TsgcWSConnection;
const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean);
begin
if not Continuation then
Memo1.Lines.Add('final fragment received');
end;