TsgcTURNServer › Events › OnTURNChannelDataDiscarded
Raised when a ChannelData message is dropped because the channel number is invalid or has no permission.
property OnTURNChannelDataDiscarded: TsgcTURNChannelDataDiscardedEvent;
// TsgcTURNChannelDataDiscardedEvent = procedure(Sender: TObject; const aSocket: TsgcSocketConnection; const aChannelData: TsgcTURNChannelData; const aReason: string) of object
—
Fired when the server silently drops an incoming ChannelData datagram without relaying it. Typical reasons carried in aReason include: channel number outside the legal 0x4000–0x7FFF range, no channel binding on the Allocation, channel binding has expired, no matching permission installed for the bound peer address, or the datagram is shorter than the length advertised in the 4-byte header. aChannelData exposes the channel number and the raw payload that was discarded. No error response is sent back to the client per RFC 5766; use this event for diagnostics or intrusion detection when unexpected discards appear. Runs on the listener thread unless NotifyEvents redirects it.
procedure TForm1.OnTURNChannelDataDiscarded(Sender: TObject;
const aSocket: TsgcSocketConnection; const aChannelData: TsgcTURNChannelData;
const aReason: string);
begin
Memo1.Lines.Add(Format('ChannelData dropped from %s: %s',
[aSocket.PeerIP, aReason]));
end;