TsgcSTUNClientEvents › OnSTUNException

OnSTUNException Event

Fires when an unhandled exception is raised while processing STUN protocol messages.

Syntax

property OnSTUNException: TsgcSTUNExceptionEvent;
// TsgcSTUNExceptionEvent = procedure(Sender: TObject; E: Exception) of object

Default Value

Remarks

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.

Example

procedure TForm1.oSTUNSTUNException(Sender: TObject; E: Exception);
begin
  DoLog('STUN exception: ' + E.ClassName + ' - ' + E.Message);
end;

Back to Events