TsgcTURNClientEvents › OnSTUNException

OnSTUNException Event

Fires when a transport, parsing or timeout exception occurs while processing a STUN/TURN message.

Syntax

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

Default Value

Remarks

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.

Example

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

Back to Events