TsgcTURNServer이벤트 › OnTURNMessageDiscarded

OnTURNMessageDiscarded 이벤트

서버가 수신한 TURN 메시지가 응답이 생성되기 전에 폐기될 때 발생합니다.

구문

property OnTURNMessageDiscarded: TsgcTURNMessageDiscardedEvent;
// TsgcTURNMessageDiscardedEvent = procedure(Sender: TObject; const aSocket: TsgcSocketConnection; aMethod: TsgcStunMessageMethod; const aMessage: TsgcSTUN_Message; const aReason: string) of object

기본값

설명

서버가 응답이나 오류를 다시 보내지 않고 들어오는 STUN/TURN 메시지를 폐기할 때 발생합니다. aMethod는 헤더에서 감지된 메서드(Allocate, Refresh, CreatePermission, ChannelBind, Send, Data)를 식별하고, aMessage는 파싱된 STUN 메시지를 노출하며, aReason은 데이터그램이 폐기된 이유를 설명합니다. 일반적인 원인으로는 Send indication에 대한 할당 누락, XOR-PEER-ADDRESS가 지정한 피어에 대한 권한 미설치, 잘못된 형식의 헤더, 지원되지 않는 메서드, 또는 rate-limit된 소스가 있습니다. 이 이벤트를 진단 및 침입 탐지에 사용하십시오. OnSTUNRequestError와 달리 이 이벤트는 응답이 전혀 생성되지 않는 RFC-silent 폐기 경로에 대해 발생합니다. NotifyEvents가 리디렉션하지 않는 한 리스너 스레드에서 실행됩니다.

예제

procedure TForm1.OnTURNMessageDiscarded(Sender: TObject;
  const aSocket: TsgcSocketConnection; aMethod: TsgcStunMessageMethod;
  const aMessage: TsgcSTUN_Message; const aReason: string);
begin
  Memo1.Lines.Add(Format('TURN message dropped from %s: %s',
    [aSocket.PeerIP, aReason]));
end;

이벤트로 돌아가기