TsgcRTCPeerConnection › Methods › Clear
Resets the peer-connection state and releases the active channel binding.
procedure Clear;
Discards the currently nominated candidate pair, the DTLS candidate pair and any TURN channel binding that had been created for the session. Call it before restarting a negotiation, switching rooms, or when the remote peer has disconnected and you want to reuse the same component instance for a new session.
Clear does not close the signalling WebSocket nor release the options; set Active to False on the WebSocket or free the component to tear down the underlying connections.
// ... remote peer disconnected, reset state and try again
oRTC.Clear;
oRTC.GatherCandidates;