TsgcWSPClient_sgc › 이벤트 › OnFragmented
프래그먼트화된 WebSocket 프레임에 대해 발생하며, OpCode와 continuation 플래그를 노출합니다.
property OnFragmented: TsgcWSFragmentedEvent;
// TsgcWSFragmentedEvent = procedure(Connection: TsgcWSConnection; const Data: TMemoryStream; const OpCode: TOpCode; const Continuation: Boolean) of object
—
서버가 여러 프레임에 걸쳐 분할된 메시지를 보낼 때 프래그먼트당 한 번 트리거됩니다. OpCode는 프래그먼트가 텍스트인지 바이너리인지 식별합니다. Continuation은 더 많은 프래그먼트가 예상되는 동안 True이고 마지막 프래그먼트에서는 False입니다.
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;