FMIceLinkTurnServer Class Reference

Inherits from FMIceLinkStunServer : FMIceLinkDynamic : FMIceLinkSerializable : NSObject
Declared in FMIceLinkTurnServer.h
FMIceLinkTurnServer.m

Overview

An TURN/STUN server.

– allocationCount

Gets the number of active allocations.
- (int)allocationCount

Discussion

Gets the number of active allocations.

Declared In

FMIceLinkTurnServer.h

– allocationPortMax

Gets the maximum allowed port to be used when allocating sockets. The default value is 65535.
- (int)allocationPortMax

Discussion

Gets the maximum allowed port to be used when allocating sockets. The default value is 65535.

Declared In

FMIceLinkTurnServer.h

– allocationPortMin

Gets the minimum allowed port to be used when allocating sockets. The default value is 49152.
- (int)allocationPortMin

Discussion

Gets the minimum allowed port to be used when allocating sockets. The default value is 49152.

Declared In

FMIceLinkTurnServer.h

– createExceptionResponseWithRequest:remoteAddress:error:

Creates an exception response.
- (FMIceLinkStunMessage *)createExceptionResponseWithRequest:(FMIceLinkStunMessage *)request remoteAddress:(FMIceLinkTransportAddress *)remoteAddress error:(FMIceLinkStunError *)error

Parameters

request

The request.

remoteAddress

The remote address.

error

The error.

Discussion

Creates an exception response.

Declared In

FMIceLinkTurnServer.h

– defaultAllocateLifetime

Gets the default lifetime for new allocations in seconds. Defaults to 600 (10 minutes).
- (long long)defaultAllocateLifetime

Discussion

Gets the default lifetime for new allocations in seconds. Defaults to 600 (10 minutes).

Declared In

FMIceLinkTurnServer.h

– defaultRefreshLifetime

Gets the default lifetime for refreshed allocations in seconds. Defaults to 600 (10 minutes).
- (long long)defaultRefreshLifetime

Discussion

Gets the default lifetime for refreshed allocations in seconds. Defaults to 600 (10 minutes).

Declared In

FMIceLinkTurnServer.h

– disableBypass

Gets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates.
- (bool)disableBypass

Discussion

Gets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates.

Declared In

FMIceLinkTurnServer.h

– forceDefaultAllocateLifetime

Gets whether the server should force the default lifetime for new allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.
- (bool)forceDefaultAllocateLifetime

Discussion

Gets whether the server should force the default lifetime for new allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.

Declared In

FMIceLinkTurnServer.h

– forceDefaultRefreshLifetime

Gets whether the server should force the default lifetime for refreshed allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.
- (bool)forceDefaultRefreshLifetime

Discussion

Gets whether the server should force the default lifetime for refreshed allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.

Declared In

FMIceLinkTurnServer.h

– initWithAuthCallback:

Initializes a new instance of the FMIceLinkTurnServer class.
- (instancetype)initWithAuthCallback:(FMIceLinkFunction1 *)authCallback

Parameters

authCallback

The authentication callback.

Discussion

Initializes a new instance of the FMIceLinkTurnServer class.

Declared In

FMIceLinkTurnServer.h

– initWithAuthCallbackBlock:

Initializes a new instance of the FMIceLinkTurnServer class.
- (instancetype)initWithAuthCallbackBlock:(FMIceLinkTurnAuthResult *( ^ ) ( FMIceLinkTurnAuthArgs *))authCallbackBlock

Parameters

authCallbackBlock

The authentication callback.

Discussion

Initializes a new instance of the FMIceLinkTurnServer class.

Declared In

FMIceLinkTurnServer.h

– label

Gets the label.
- (NSString *)label

Discussion

Gets the label.

Declared In

FMIceLinkTurnServer.h

– maxAllocateLifetime

Gets the maximum lifetime for new allocations in seconds. Defaults to 3600 (1 hour).
- (long long)maxAllocateLifetime

Discussion

Gets the maximum lifetime for new allocations in seconds. Defaults to 3600 (1 hour).

Declared In

FMIceLinkTurnServer.h

– maxRefreshLifetime

Gets the maximum lifetime for refreshed allocations in seconds. Defaults to 3600 (1 hour).
- (long long)maxRefreshLifetime

Discussion

Gets the maximum lifetime for refreshed allocations in seconds. Defaults to 3600 (1 hour).

Declared In

FMIceLinkTurnServer.h

– minAllocateLifetime

Gets the minimum lifetime for new allocations in seconds. Equal to 600 (10 minutes).
- (long long)minAllocateLifetime

Discussion

Gets the minimum lifetime for new allocations in seconds. Equal to 600 (10 minutes).

Declared In

FMIceLinkTurnServer.h

– minRefreshLifetime

Gets the minimum lifetime for refreshed allocations in seconds. Equal to 600 (10 minutes).
- (long long)minRefreshLifetime

Discussion

Gets the minimum lifetime for refreshed allocations in seconds. Equal to 600 (10 minutes).

Declared In

FMIceLinkTurnServer.h

– nonce

Gets the current nonce.
- (NSString *)nonce

Discussion

Gets the current nonce.

Declared In

FMIceLinkTurnServer.h

– processBuffer:udpServerSocket:tcpServerSocket:localAddress:remoteAddress:readLength:

Processes the buffer.
- (bool)processBuffer:(FMIceLinkDataBuffer *)buffer udpServerSocket:(FMIceLinkDatagramSocket *)udpServerSocket tcpServerSocket:(FMIceLinkStreamSocket *)tcpServerSocket localAddress:(FMIceLinkServerAddress *)localAddress remoteAddress:(FMIceLinkTransportAddress *)remoteAddress readLength:(int *)readLength

Parameters

buffer

The buffer.

udpServerSocket

The UDP server socket.

tcpServerSocket

The TCP server socket.

localAddress

The local address.

remoteAddress

The remote address.

readLength

Length of the read.

Discussion

Processes the buffer.

Declared In

FMIceLinkTurnServer.h

– processWithRequest:udpServerSocket:tcpServerSocket:localAddress:remoteAddress:

Processes the specified request.
- (FMIceLinkStunMessage *)processWithRequest:(FMIceLinkStunMessage *)request udpServerSocket:(FMIceLinkDatagramSocket *)udpServerSocket tcpServerSocket:(FMIceLinkStreamSocket *)tcpServerSocket localAddress:(FMIceLinkServerAddress *)localAddress remoteAddress:(FMIceLinkTransportAddress *)remoteAddress

Parameters

request

The request.

udpServerSocket

The UDP server socket.

tcpServerSocket

The TCP server socket.

localAddress

The local address.

remoteAddress

The remote address.

Discussion

Processes the specified request.

Declared In

FMIceLinkTurnServer.h

– realm

Gets the realm used for this server.
- (NSString *)realm

Discussion

Gets the realm used for this server.

Declared In

FMIceLinkTurnServer.h

– setAllocationPortMax:

Sets the maximum allowed port to be used when allocating sockets. The default value is 65535.
- (void)setAllocationPortMax:(int)value

Discussion

Sets the maximum allowed port to be used when allocating sockets. The default value is 65535.

Declared In

FMIceLinkTurnServer.h

– setAllocationPortMin:

Sets the minimum allowed port to be used when allocating sockets. The default value is 49152.
- (void)setAllocationPortMin:(int)value

Discussion

Sets the minimum allowed port to be used when allocating sockets. The default value is 49152.

Declared In

FMIceLinkTurnServer.h

– setDefaultAllocateLifetime:

Sets the default lifetime for new allocations in seconds. Defaults to 600 (10 minutes).
- (void)setDefaultAllocateLifetime:(long long)value

Discussion

Sets the default lifetime for new allocations in seconds. Defaults to 600 (10 minutes).

Declared In

FMIceLinkTurnServer.h

– setDefaultRefreshLifetime:

Sets the default lifetime for refreshed allocations in seconds. Defaults to 600 (10 minutes).
- (void)setDefaultRefreshLifetime:(long long)value

Discussion

Sets the default lifetime for refreshed allocations in seconds. Defaults to 600 (10 minutes).

Declared In

FMIceLinkTurnServer.h

– setDisableBypass:

Sets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates.
- (void)setDisableBypass:(bool)value

Discussion

Sets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates.

Declared In

FMIceLinkTurnServer.h

– setForceDefaultAllocateLifetime:

Sets whether the server should force the default lifetime for new allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.
- (void)setForceDefaultAllocateLifetime:(bool)value

Discussion

Sets whether the server should force the default lifetime for new allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.

Declared In

FMIceLinkTurnServer.h

– setForceDefaultRefreshLifetime:

Sets whether the server should force the default lifetime for refreshed allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.
- (void)setForceDefaultRefreshLifetime:(bool)value

Discussion

Sets whether the server should force the default lifetime for refreshed allocations (true) or allow clients to request their own lifetime within the min/max range (false). Defaults to false.

Declared In

FMIceLinkTurnServer.h

– setMaxAllocateLifetime:

Sets the maximum lifetime for new allocations in seconds. Defaults to 3600 (1 hour).
- (void)setMaxAllocateLifetime:(long long)value

Discussion

Sets the maximum lifetime for new allocations in seconds. Defaults to 3600 (1 hour).

Declared In

FMIceLinkTurnServer.h

– setMaxRefreshLifetime:

Sets the maximum lifetime for refreshed allocations in seconds. Defaults to 3600 (1 hour).
- (void)setMaxRefreshLifetime:(long long)value

Discussion

Sets the maximum lifetime for refreshed allocations in seconds. Defaults to 3600 (1 hour).

Declared In

FMIceLinkTurnServer.h

– setRealm:

Sets the [realm](#//api/name/realm) used for this server.
- (void)setRealm:(NSString *)value

Discussion

Sets the [realm](#//api/name/realm) used for this server.

Declared In

FMIceLinkTurnServer.h

– setStaleNonceSecurity:

Sets whether the server should enforce stale[nonce](#//api/name/nonce) security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent [nonce](#//api/name/nonce).
- (void)setStaleNonceSecurity:(bool)value

Discussion

Sets whether the server should enforce stale[nonce](#//api/name/nonce) security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent [nonce](#//api/name/nonce).

Declared In

FMIceLinkTurnServer.h

– staleNonceSecurity

Gets whether the server should enforce stale[nonce](#//api/name/nonce) security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent [nonce](#//api/name/nonce).
- (bool)staleNonceSecurity

Discussion

Gets whether the server should enforce stale[nonce](#//api/name/nonce) security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent [nonce](#//api/name/nonce).

Declared In

FMIceLinkTurnServer.h

– startWithUdpAddresses:tcpAddresses:tlsAddresses:tlsCertificate:

Starts the server.
- (bool)startWithUdpAddresses:(NSMutableArray *)udpAddresses tcpAddresses:(NSMutableArray *)tcpAddresses tlsAddresses:(NSMutableArray *)tlsAddresses tlsCertificate:(FMIceLinkTlsCertificate *)tlsCertificate

Parameters

udpAddresses

The UDP addresses to listen on.

tcpAddresses

The TCP addresses to listen on.

tlsAddresses

The TLS addresses to listen on.

tlsCertificate

The TLS certificate.

Discussion

Starts the server.

Declared In

FMIceLinkTurnServer.h

– stop

Stops the server.
- (bool)stop

Discussion

Stops the server.

Declared In

FMIceLinkTurnServer.h

+ turnServerWithAuthCallback:

Initializes a new instance of the FMIceLinkTurnServer class.
+ (FMIceLinkTurnServer *)turnServerWithAuthCallback:(FMIceLinkFunction1 *)authCallback

Parameters

authCallback

The authentication callback.

Discussion

Initializes a new instance of the FMIceLinkTurnServer class.

Declared In

FMIceLinkTurnServer.h

+ turnServerWithAuthCallbackBlock:

Initializes a new instance of the FMIceLinkTurnServer class.
+ (FMIceLinkTurnServer *)turnServerWithAuthCallbackBlock:(FMIceLinkTurnAuthResult *( ^ ) ( FMIceLinkTurnAuthArgs *))authCallbackBlock

Parameters

authCallbackBlock

The authentication callback.

Discussion

Initializes a new instance of the FMIceLinkTurnServer class.

Declared In

FMIceLinkTurnServer.h