TsgcSTUNClient › Events › OnSTUNException
Fires when an unhandled exception is raised while processing STUN protocol messages.
property OnSTUNException: TsgcSTUNExceptionEvent;
// TsgcSTUNExceptionEvent = procedure(Sender: TObject; E: Exception) of object
—
Surfaces any exception that escapes the STUN parsing, retransmission or authentication code paths - for example a socket error, a malformed response or an attribute that could not be decoded. Use E to read the message and class, and to decide whether to log, retry or call Clear to reset the client.
procedure TForm1.oSTUNSTUNException(Sender: TObject; E: Exception);
begin
DoLog('STUN exception: ' + E.ClassName + ' - ' + E.Message);
end;