TsgcTURNClientMethods › CreatePermission

CreatePermission Method

Installs a 5-minute permission that allows a specific peer IP to reach the relayed transport address.

Syntax

procedure CreatePermission(const aPeerIP: string);

Parameters

NameTypeDescription
aPeerIPconst stringIP address of the peer that is allowed to send traffic to the relayed transport address. If a permission already exists for this IP the server refreshes it.

Remarks

Sends a CreatePermission request (RFC 5766 section 9). Permissions are bound to a peer IP address only (port is ignored) and expire 300 seconds after installation unless refreshed. Datagrams arriving on the relay from a peer without an active permission or bound channel are silently dropped by the TURN server.

On success the event OnTURNCreatePermission fires. When TURNOptions.AutoRefresh.Permissions is enabled the component reinstalls permissions automatically before they expire.

Example

oTURN.CreatePermission('203.0.113.25');

Back to Methods