TsgcTURNServerPropriedades › Active

Active Property

Inicia ou para o servidor TURN; defina como True para começar a aceitar requisições ALLOCATE, Binding e de relay.

Sintaxe

property Active: Boolean read GetActive write SetActive;

Valor Padrão

Observações

Defina Active como True para abrir o socket UDP em Host/Port, iniciar o timer de expiração de alocação e começar a atender Binding Requests STUN junto com os métodos TURN (ALLOCATE, REFRESH, CREATE-PERMISSION, CHANNEL-BIND, indicações SEND/DATA e ChannelData). Configure Port, STUNOptions, TURNOptions e quaisquer entradas extras de AddBinding antes da ativação. Definir Active como False fecha todos os listeners, expira todas as Allocations ativas (disparando OnTURNDeleteAllocation) e libera as portas de relay de volta ao pool.

Exemplo

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;

Voltar para Propriedades