TsgcWSPServer_FilesEvents › OnFragmented

OnFragmented Event

Fired when a fragmented WebSocket frame is received from a client.

Syntax

property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object

Default Value

Remarks

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.

Example

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;

Back to Events