TsgcWSPClient_sgc이벤트 › OnFragmented

OnFragmented Event

프래그먼트화된 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;

이벤트로 돌아가기