TsgcICEClientProperties › TURNClient

TURNClient Property

TURN client used to allocate relayed transport addresses and obtain relay candidates during ICE gathering.

Syntax

property TURNClient: TsgcTURNClient_Base read FTURNClient write SetTURNClient;

Default Value

Remarks

Attaches an existing TsgcTURNClient to the ICE agent. The ICE client delegates STUN reflexive discovery and TURN allocation (RFC 5389 / RFC 5766) to this peer so that server-reflexive and relayed candidates can be added to the local candidate set during GatherCandidates. The linked TURN client must be configured with Host, Port and TURNOptions.Authentication before gathering begins; if the property is left nil only host candidates are produced and peer connectivity is limited to direct paths.

Example

oTURN := TsgcTURNClient.Create(nil);
oTURN.Host := 'turn.sgcwebsockets.com';
oTURN.Port := 3478;
oTURN.TURNOptions.Authentication.Credentials := stauLongTermCredential;
oTURN.TURNOptions.Authentication.Username := 'user';
oTURN.TURNOptions.Authentication.Password := 'secret';

oICE := TsgcICEClient.Create(nil);
oICE.TURNClient := oTURN;
oICE.GatherCandidates;

Back to Properties