TsgcWSPClient_sgc › Eventi › OnFragmented
Viene attivato per i frame WebSocket frammentati, esponendo OpCode e il flag di continuazione.
property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object
—
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.
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;