TsgcWSPClient_sgcEventi › OnFragmented

OnFragmented Evento

Viene attivato per i frame WebSocket frammentati, esponendo OpCode e il flag di continuazione.

Sintassi

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

Valore predefinito

Note

Generato una volta per frammento quando il server invia un messaggio suddiviso su più frame. OpCode identifica se il frammento è testo o binario; Continuation è True finché si attendono altri frammenti e False sull'ultimo frammento.

Esempio

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;

Torna agli Eventi