An TURN/STUN server. More...
Instance Methods | |
| (int) | - allocationCount |
| Gets the number of active allocations. More... | |
| (int) | - allocationPortMax |
| Gets the maximum allowed port to be used when allocating sockets. More... | |
| (int) | - allocationPortMin |
| Gets the minimum allowed port to be used when allocating sockets. More... | |
| (FMLiveSwitchStunMessage *) | - createExceptionResponseWithRequest:remoteAddress:error: |
| Creates an exception response. More... | |
| (long long) | - defaultAllocateLifetime |
| Gets the default lifetime for new allocations in seconds. More... | |
| (long long) | - defaultRefreshLifetime |
| Gets the default lifetime for refreshed allocations in seconds. More... | |
| (bool) | - disableBypass |
| Gets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates. More... | |
| (NSMutableArray *) | - forbiddenPeerCidrs |
| Gets the list of forbidden peer CIDRs. More... | |
| (bool) | - 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). More... | |
| (bool) | - 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). More... | |
| (instancetype) | - initWithAuthCallback: |
| Initializes a new instance of the FMLiveSwitchTurnServer class. More... | |
| (instancetype) | - initWithAuthCallbackBlock: |
| Initializes a new instance of the FMLiveSwitchTurnServer class. More... | |
| (NSString *) | - label |
| Gets the label. More... | |
| (long long) | - maxAllocateLifetime |
| Gets the maximum lifetime for new allocations in seconds. More... | |
| (long long) | - maxRefreshLifetime |
| Gets the maximum lifetime for refreshed allocations in seconds. More... | |
| (long long) | - minAllocateLifetime |
| Gets the minimum lifetime for new allocations in seconds. More... | |
| (long long) | - minRefreshLifetime |
| Gets the minimum lifetime for refreshed allocations in seconds. More... | |
| (NSString *) | - nonce |
| Gets the current nonce. More... | |
| (bool) | - processBuffer:udpServerSocket:tcpServerSocket:localAddress:remoteAddress:readLength: |
| Processes the buffer. More... | |
| (FMLiveSwitchStunMessage *) | - processWithRequest:udpServerSocket:tcpServerSocket:localAddress:remoteAddress: |
| Processes the specified request. More... | |
| (NSString *) | - realm |
| Gets the realm used for this server. More... | |
| (void) | - setAllocationPortMax: |
| Sets the maximum allowed port to be used when allocating sockets. More... | |
| (void) | - setAllocationPortMin: |
| Sets the minimum allowed port to be used when allocating sockets. More... | |
| (void) | - setDefaultAllocateLifetime: |
| Sets the default lifetime for new allocations in seconds. More... | |
| (void) | - setDefaultRefreshLifetime: |
| Sets the default lifetime for refreshed allocations in seconds. More... | |
| (void) | - setDisableBypass: |
| Sets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates. More... | |
| (void) | - setForbiddenPeerCidrs: |
| Sets the list of forbidden peer CIDRs. More... | |
| (void) | - 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). More... | |
| (void) | - 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). More... | |
| (void) | - setMaxAllocateLifetime: |
| Sets the maximum lifetime for new allocations in seconds. More... | |
| (void) | - setMaxRefreshLifetime: |
| Sets the maximum lifetime for refreshed allocations in seconds. More... | |
| (void) | - setRealm: |
| Sets the realm used for this server. More... | |
| (void) | - setStaleNonceSecurity: |
| Sets whether the server should enforce stale-nonce security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent nonce. More... | |
| (bool) | - staleNonceSecurity |
| Gets whether the server should enforce stale-nonce security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent nonce. More... | |
| (bool) | - startWithUdpAddresses:tcpAddresses:tlsAddresses: |
| Starts the server. More... | |
| (bool) | - stop |
| Stops the server. More... | |
Instance Methods inherited from FMLiveSwitchStunServer | |
| (FMLiveSwitchFunction1< FMLiveSwitchDatagramSocketCreateArgs *, FMLiveSwitchDatagramSocket * > *) | - createDatagramSocket |
| Gets the create callback to create a datagram socket. More... | |
| (FMLiveSwitchStunMessage *) | - createErrorResponseWithRequest:remoteAddress:errorMessage: |
| Creates an error response with a ganeric Stun server error. More... | |
| (FMLiveSwitchFunction1< FMLiveSwitchStreamSocketCreateArgs *, FMLiveSwitchStreamSocket * > *) | - createStreamSocket |
| Gets the create callback to create a stream socket. More... | |
| (bool) | - disableTcp |
| Gets whether to prevent the server from listening for TCP requests. More... | |
| (bool) | - disableTls |
| Gets whether to prevent the server from listening for TLS requests. More... | |
| (bool) | - disableUdp |
| Gets whether to prevent the server from listening for UDP requests. More... | |
| (NSString *) | - getPrefixWithUdp:secure: |
| Gets a prefix. More... | |
| (instancetype) | - init |
| Initializes a new instance of the FMLiveSwitchSerializable class. More... | |
| (FMLiveSwitchServerAddress *) | - localTcpAddress |
| Gets the local TCP address. More... | |
| (NSMutableArray *) | - localTcpAddresses |
| Gets the local TCP addresses. More... | |
| (FMLiveSwitchServerAddress *) | - localUdpAddress |
| Gets the local UDP address. More... | |
| (NSMutableArray *) | - localUdpAddresses |
| Gets the local UDP addresses. More... | |
| (void) | - setCreateDatagramSocket: |
| Sets the create callback to create a datagram socket. More... | |
| (FMLiveSwitchDatagramSocketCreateArgs *) | - setCreateDatagramSocketBlock |
| Sets the create callback to create a datagram socket. More... | |
| (void) | - setCreateDatagramSocketBlock: |
| Sets the create callback to create a datagram socket. More... | |
| (void) | - setCreateStreamSocket: |
| Sets the create callback to create a stream socket. More... | |
| (FMLiveSwitchStreamSocketCreateArgs *) | - setCreateStreamSocketBlock |
| Sets the create callback to create a stream socket. More... | |
| (void) | - setCreateStreamSocketBlock: |
| Sets the create callback to create a stream socket. More... | |
| (void) | - setDisableTcp: |
| Sets whether to prevent the server from listening for TCP requests. More... | |
| (void) | - setDisableTls: |
| Sets whether to prevent the server from listening for TLS requests. More... | |
| (void) | - setDisableUdp: |
| Sets whether to prevent the server from listening for UDP requests. More... | |
| (void) | - setStreamSendTimeout: |
| Sets timeout for asynchronous data sending over stream sockets in ms. More... | |
| (bool) | - start |
| Starts the server. More... | |
| (bool) | - startWithUdpAddresses: |
| Starts the server. More... | |
| (bool) | - startWithUdpAddresses:tcpAddresses: |
| Starts the server. More... | |
| (int) | - streamSendTimeout |
| Gets timeout for asynchronous data sending over stream sockets in ms. More... | |
| (NSMutableArray *) | - tcpAddresses |
| Gets the TCP server addresses. More... | |
| (NSMutableArray *) | - tlsAddresses |
| Gets the TLS server addresses. More... | |
| (NSMutableArray *) | - udpAddresses |
| Gets the UDP server addresses. More... | |
Instance Methods inherited from FMLiveSwitchDynamic | |
| (NSMutableDictionary< NSString *, id > *) | - dynamicProperties |
| Gets all dynamic properties on this instance. More... | |
| (id) | - getDynamicValueWithKey: |
| Gets a property value from the local cache. More... | |
| (void) | - setDynamicValueWithKey:value: |
| Sets a property value in the local cache. More... | |
| (bool) | - unsetDynamicValueWithKey: |
| Removes a property value from the local cache. More... | |
Class Methods | |
| (FMLiveSwitchTurnServer *) | + turnServerWithAuthCallback: |
| Initializes a new instance of the FMLiveSwitchTurnServer class. More... | |
| (FMLiveSwitchTurnServer *) | + turnServerWithAuthCallbackBlock: |
| Initializes a new instance of the FMLiveSwitchTurnServer class. More... | |
Class Methods inherited from FMLiveSwitchStunServer | |
| (FMLiveSwitchStunServer *) | + stunServer |
Class Methods inherited from FMLiveSwitchDynamic | |
| (FMLiveSwitchDynamic *) | + dynamic |
Class Methods inherited from FMLiveSwitchSerializable | |
| (FMLiveSwitchSerializable *) | + serializable |
| Initializes a new instance of the FMLiveSwitchSerializable class. More... | |
An TURN/STUN server.
| - (int) allocationCount |
Gets the number of active allocations.
| - (int) allocationPortMax |
Gets the maximum allowed port to be used when allocating sockets.
The default value is 65535.
| - (int) allocationPortMin |
Gets the minimum allowed port to be used when allocating sockets.
The default value is 49152.
| - (FMLiveSwitchStunMessage*) createExceptionResponseWithRequest: | (FMLiveSwitchStunMessage *) | request | |
| remoteAddress: | (FMLiveSwitchTransportAddress *) | remoteAddress | |
| error: | (FMLiveSwitchStunError *) | error | |
Creates an exception response.
| request | The request. |
| remoteAddress | The remote address. |
| error | The error. |
Implements FMLiveSwitchStunServer.
| - (long long) defaultAllocateLifetime |
Gets the default lifetime for new allocations in seconds.
Defaults to 600 (10 minutes).
| - (long long) defaultRefreshLifetime |
Gets the default lifetime for refreshed allocations in seconds.
Defaults to 600 (10 minutes).
| - (bool) disableBypass |
Gets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates.
| - (NSMutableArray*) forbiddenPeerCidrs |
Gets the list of forbidden peer CIDRs.
Addresses matching this list are banned from receiving relayed data packets.
| - (bool) 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) 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.
| - (instancetype) initWithAuthCallback: | (FMLiveSwitchFunction1< FMLiveSwitchTurnAuthArgs *, FMLiveSwitchTurnAuthResult * > *) | authCallback |
Initializes a new instance of the FMLiveSwitchTurnServer class.
| authCallback | The authentication callback. |
| - (instancetype) initWithAuthCallbackBlock: | (FMLiveSwitchTurnAuthResult *(^)(FMLiveSwitchTurnAuthArgs *)) | authCallbackBlock |
Initializes a new instance of the FMLiveSwitchTurnServer class.
| authCallbackBlock | The authentication callback. |
| - (NSString*) label |
Gets the label.
Implements FMLiveSwitchStunServer.
| - (long long) maxAllocateLifetime |
Gets the maximum lifetime for new allocations in seconds.
Defaults to 3600 (1 hour).
| - (long long) maxRefreshLifetime |
Gets the maximum lifetime for refreshed allocations in seconds.
Defaults to 3600 (1 hour).
| - (long long) minAllocateLifetime |
Gets the minimum lifetime for new allocations in seconds.
Equal to 600 (10 minutes).
| - (long long) minRefreshLifetime |
Gets the minimum lifetime for refreshed allocations in seconds.
Equal to 600 (10 minutes).
| - (NSString*) nonce |
Gets the current nonce.
| - (bool) processBuffer: | (FMLiveSwitchDataBuffer *) | buffer | |
| udpServerSocket: | (FMLiveSwitchDatagramSocket *) | udpServerSocket | |
| tcpServerSocket: | (FMLiveSwitchStreamSocket *) | tcpServerSocket | |
| localAddress: | (FMLiveSwitchServerAddress *) | localAddress | |
| remoteAddress: | (FMLiveSwitchTransportAddress *) | remoteAddress | |
| readLength: | (int *) | readLength | |
Processes the buffer.
| 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. |
Implements FMLiveSwitchStunServer.
| - (FMLiveSwitchStunMessage*) processWithRequest: | (FMLiveSwitchStunMessage *) | request | |
| udpServerSocket: | (FMLiveSwitchDatagramSocket *) | udpServerSocket | |
| tcpServerSocket: | (FMLiveSwitchStreamSocket *) | tcpServerSocket | |
| localAddress: | (FMLiveSwitchServerAddress *) | localAddress | |
| remoteAddress: | (FMLiveSwitchTransportAddress *) | remoteAddress | |
Processes the specified request.
| request | The request. |
| udpServerSocket | The UDP server socket. |
| tcpServerSocket | The TCP server socket. |
| localAddress | The local address. |
| remoteAddress | The remote address. |
Implements FMLiveSwitchStunServer.
| - (NSString*) realm |
Gets the realm used for this server.
| - (void) setAllocationPortMax: | (int) | value |
Sets the maximum allowed port to be used when allocating sockets.
The default value is 65535.
| - (void) setAllocationPortMin: | (int) | value |
Sets the minimum allowed port to be used when allocating sockets.
The default value is 49152.
| - (void) setDefaultAllocateLifetime: | (long long) | value |
Sets the default lifetime for new allocations in seconds.
Defaults to 600 (10 minutes).
| - (void) setDefaultRefreshLifetime: | (long long) | value |
Sets the default lifetime for refreshed allocations in seconds.
Defaults to 600 (10 minutes).
| - (void) setDisableBypass: | (bool) | value |
Sets a value indicating whether to disable the in-memory bypass of the network when communicating between two relay candidates.
| - (void) setForbiddenPeerCidrs: | (NSMutableArray *) | value |
Sets the list of forbidden peer CIDRs.
Addresses matching this list are banned from receiving relayed data packets.
| - (void) setForceDefaultAllocateLifetime: | (bool) | value |
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) setForceDefaultRefreshLifetime: | (bool) | value |
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) setMaxAllocateLifetime: | (long long) | value |
Sets the maximum lifetime for new allocations in seconds.
Defaults to 3600 (1 hour).
| - (void) setMaxRefreshLifetime: | (long long) | value |
Sets the maximum lifetime for refreshed allocations in seconds.
Defaults to 3600 (1 hour).
| - (void) setRealm: | (NSString *) | value |
Sets the realm used for this server.
| - (void) setStaleNonceSecurity: | (bool) | value |
Sets whether the server should enforce stale-nonce security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent nonce.
| - (bool) staleNonceSecurity |
Gets whether the server should enforce stale-nonce security by sending a 438 Stale Nonce in response to allocate requests with a stale or non-existent nonce.
| - (bool) startWithUdpAddresses: | (NSMutableArray *) | udpAddresses | |
| tcpAddresses: | (NSMutableArray *) | tcpAddresses | |
| tlsAddresses: | (NSMutableArray *) | tlsAddresses | |
Starts the server.
| udpAddresses | The UDP addresses to listen on. |
| tcpAddresses | The TCP addresses to listen on. |
| tlsAddresses | The TLS addresses to listen on. |
Implements FMLiveSwitchStunServer.
| - (bool) stop |
Stops the server.
Implements FMLiveSwitchStunServer.
| + (FMLiveSwitchTurnServer*) turnServerWithAuthCallback: | (FMLiveSwitchFunction1< FMLiveSwitchTurnAuthArgs *, FMLiveSwitchTurnAuthResult * > *) | authCallback |
Initializes a new instance of the FMLiveSwitchTurnServer class.
| authCallback | The authentication callback. |
| + (FMLiveSwitchTurnServer*) turnServerWithAuthCallbackBlock: | (FMLiveSwitchTurnAuthResult *(^)(FMLiveSwitchTurnAuthArgs *)) | authCallbackBlock |
Initializes a new instance of the FMLiveSwitchTurnServer class.
| authCallbackBlock | The authentication callback. |