TsgcTURNServer › Properties › Active
Starts or stops the TURN server; set to True to begin accepting ALLOCATE, Binding and relay requests.
property Active: Boolean read GetActive write SetActive;
—
Set Active to True to open the UDP socket on Host/Port, start the allocation-expiry timer and begin serving STUN Binding Requests together with the TURN methods (ALLOCATE, REFRESH, CREATE-PERMISSION, CHANNEL-BIND, SEND/DATA indications and ChannelData). Configure Port, STUNOptions, TURNOptions and any extra AddBinding entries before activation. Setting Active to False closes every listener, expires all active Allocations (firing OnTURNDeleteAllocation) and releases the relay ports back to the pool.
oTURN := TsgcTURNServer.Create(nil);
oTURN.Port := 3478;
oTURN.TURNOptions.Authentication.Enabled := True;
oTURN.TURNOptions.Authentication.LongTermCredentials.Enabled := True;
oTURN.TURNOptions.Authentication.LongTermCredentials.Realm := 'esegece.com';
oTURN.Active := True;