TsgcWSPClient_sgc › Zdarzenia › OnFragmented
Wywoływane dla fragmentowanych ramek WebSocket, ujawniając OpCode i flagę kontynuacji.
property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object
—
Wywoływane raz na fragment, gdy serwer wysyła wiadomość podzieloną na kilka ramek. OpCode określa, czy fragment jest tekstowy czy binarny; Continuation ma wartość True, gdy oczekiwane są kolejne fragmenty, i False dla ostatniego fragmentu.
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;