TsgcWSPServer_Files › Events › OnFragmented
Fired when a fragmented WebSocket frame is received from a client.
property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object
—
Fires when the connection is configured with FragmentedMessages = frgOnlyFragmented and a fragmented WebSocket frame is delivered. OpCode describes the frame type and Continuation indicates whether the fragment is a continuation of an earlier message.
procedure TForm1.oFilesFragmented(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;