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