Class TurnClient
Assembly: Libplanet.Stun.dll
Syntax
public class TurnClient : object, IStunContext, IDisposable
Constructors
|
Improve this Doc
View Source
TurnClient(String, String, String, Int32)
Declaration
public TurnClient(string host, string username, string password, int port = null)
Parameters
Fields
|
Improve this Doc
View Source
TurnDefaultPort
Declaration
public const int TurnDefaultPort = null
Field Value
Properties
|
Improve this Doc
View Source
BehindNAT
Declaration
public bool BehindNAT { get; }
Property Value
|
Improve this Doc
View Source
EndPoint
Declaration
public DnsEndPoint EndPoint { get; }
Property Value
| Type |
Description |
| DnsEndPoint |
|
|
Improve this Doc
View Source
Nonce
Declaration
public byte[] Nonce { get; }
Property Value
|
Improve this Doc
View Source
Password
Declaration
public string Password { get; }
Property Value
|
Improve this Doc
View Source
PublicAddress
Declaration
public IPAddress PublicAddress { get; }
Property Value
| Type |
Description |
| IPAddress |
|
|
Improve this Doc
View Source
Realm
Declaration
public string Realm { get; }
Property Value
|
Improve this Doc
View Source
Username
Declaration
public string Username { get; }
Property Value
Methods
|
Improve this Doc
View Source
AcceptRelayedStreamAsync(CancellationToken)
Declaration
public async Task<NetworkStream> AcceptRelayedStreamAsync(CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| Task<NetworkStream> |
|
|
Improve this Doc
View Source
AllocateRequestAsync(TimeSpan, CancellationToken)
Declaration
public async Task<IPEndPoint> AllocateRequestAsync(TimeSpan lifetime, CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| TimeSpan |
lifetime |
|
| CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| Task<IPEndPoint> |
|
|
Improve this Doc
View Source
BindProxies(Int32, CancellationToken)
Declaration
public async Task BindProxies(int listenPort, CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| Int32 |
listenPort |
|
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
CreatePermissionAsync(IPEndPoint, CancellationToken)
Declaration
public async Task CreatePermissionAsync(IPEndPoint peerAddress, CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| IPEndPoint |
peerAddress |
|
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
Dispose()
Declaration
|
Improve this Doc
View Source
GetMappedAddressAsync(CancellationToken)
Declaration
public async Task<IPEndPoint> GetMappedAddressAsync(CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| Task<IPEndPoint> |
|
|
Improve this Doc
View Source
InitializeTurnAsync(CancellationToken)
Declaration
public async Task InitializeTurnAsync(CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
IsBehindNAT(CancellationToken)
Declaration
public async Task<bool> IsBehindNAT(CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
IsConnectable(CancellationToken)
Declaration
public async Task<bool> IsConnectable(CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
ReconnectTurn(Int32, CancellationToken)
Declaration
public async Task ReconnectTurn(int listenPort, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| Int32 |
listenPort |
|
| CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
RefreshAllocationAsync(TimeSpan, CancellationToken)
Declaration
public async Task<TimeSpan> RefreshAllocationAsync(TimeSpan lifetime, CancellationToken cancellationToken = null)
Parameters
| Type |
Name |
Description |
| TimeSpan |
lifetime |
|
| CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| Task<TimeSpan> |
|
|
Improve this Doc
View Source
StartAsync(Int32, CancellationToken)
Declaration
public async Task StartAsync(int listenPort, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| Int32 |
listenPort |
|
| CancellationToken |
cancellationToken |
|
Returns
Implements
IDisposable