TsgcTURNClient › Methods › CreatePermission
Installs a 5-minute permission that allows a specific peer IP to reach the relayed transport address.
procedure CreatePermission(const aPeerIP: string);
| Name | Type | Description |
|---|---|---|
aPeerIP | const string | IP 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. |
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.
oTURN.CreatePermission('203.0.113.25');