TsgcSTUNClientMethods › Clear

Clear Method

Clears the client internal state, cancelling any in-flight STUN transactions and freeing buffered messages.

Syntax

procedure Clear;

Remarks

Resets the pending-transaction list and any cached retransmission timers. Call Clear before reconfiguring the client for a new server or after an error to make sure no stale state remains from a previous SendRequest.

Example

oSTUN.Clear;
oSTUN.Host := 'stun2.sgcwebsockets.com';
oSTUN.SendRequest;

Back to Methods