TsgcTURNServer › Proprietà › Active
Avvia o arresta il server TURN; impostare su True per iniziare ad accettare richieste ALLOCATE, Binding e relay.
property Active: Boolean read GetActive write SetActive;
—
Impostare Active su True per aprire il socket UDP su Host/Port, avviare il timer di scadenza delle allocazioni e iniziare a gestire le richieste STUN Binding insieme ai metodi TURN (ALLOCATE, REFRESH, CREATE-PERMISSION, CHANNEL-BIND, indicazioni SEND/DATA e ChannelData). Configurare Port, STUNOptions, TURNOptions e qualsiasi voce aggiuntiva AddBinding prima dell'attivazione. Impostare Active su False chiude ogni listener, scade tutte le Allocazioni attive (attivando OnTURNDeleteAllocation) e rilascia le porte relay al 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;