TsgcRTCPeerConnectionMethods › GatherCandidates

GatherCandidates Method

Starts the ICE candidate gathering process.

Syntax

procedure GatherCandidates;

Remarks

Entry point of the full WebRTC session. The method:

If the signalling WebSocket cannot be reached the method raises an exception; otherwise the handshake runs asynchronously until a candidate pair is nominated and OnRTCConnect is fired.

Example

oRTC.RTCOptions.WebSocket.Host := 'signal.server.com';
oRTC.RTCOptions.WebSocket.Port := 443;
oRTC.RTCOptions.WebSocket.TLS := True;
oRTC.RTCOptions.ICE.Host := 'turn.server.com';
oRTC.RTCOptions.ICE.Port := 3478;

// ... start signalling + ICE gathering
oRTC.GatherCandidates;

Back to Methods