TsgcTURNClient › Events › OnTURNICMPIndication
Fires when the server forwards an ICMP error received from a peer (for example unreachable or TTL exceeded).
property OnTURNICMPIndication: TsgcTURNICMPIndicationEvent;
// TsgcTURNICMPIndicationEvent = procedure(Sender: TObject; const aSocket: TsgcSocketConnection; const aMessage: TsgcSTUN_Message; const aICMPIndication: TsgcTURN_ResponseICMPIndication) of object
—
Fires when the TURN server relays an ICMP error received on the relayed transport address (as defined by the TURN ICMP extension in RFC 8656 section 11.8). Read aICMPIndication.ICMPType, aICMPIndication.ICMPCode and aICMPIndication.PeerIP/PeerPort to react to conditions such as destination unreachable (type 3) or TTL exceeded (type 11) and to clean up permissions or channel bindings that target unreachable peers.
procedure TForm1.oTURNTURNICMPIndication(Sender: TObject;
const aSocket: TsgcSocketConnection; const aMessage: TsgcSTUN_Message;
const aICMPIndication: TsgcTURN_ResponseICMPIndication);
begin
DoLog('ICMP from ' + aICMPIndication.PeerIP +
', type: ' + IntToStr(aICMPIndication.ICMPType) +
', code: ' + IntToStr(aICMPIndication.ICMPCode));
end;