FMIceLinkStunServer Class Reference

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

Overview

A STUN server.

– createDatagramSocket

Gets the create callback to create a datagram socket.
- (FMIceLinkFunction1 *)createDatagramSocket

Discussion

Gets the create callback to create a datagram socket.

Declared In

FMIceLinkStunServer.h

– createErrorResponseWithRequest:remoteAddress:errorMessage:

Creates an error response with a ganeric Stun server error.
- (FMIceLinkStunMessage *)createErrorResponseWithRequest:(FMIceLinkStunMessage *)request remoteAddress:(FMIceLinkTransportAddress *)remoteAddress errorMessage:(NSString *)errorMessage

Parameters

request

The request.

remoteAddress

The remote address.

errorMessage

The erro messager.

Discussion

Creates an error response with a ganeric Stun server error.

Declared In

FMIceLinkStunServer.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 Stun error.

Discussion

Creates an exception response.

Declared In

FMIceLinkStunServer.h

– createStreamSocket

Gets the create callback to create a stream socket.
- (FMIceLinkFunction1 *)createStreamSocket

Discussion

Gets the create callback to create a stream socket.

Declared In

FMIceLinkStunServer.h

– disableTcp

Gets whether to prevent the server from listening for TCP requests.
- (bool)disableTcp

Discussion

Gets whether to prevent the server from listening for TCP requests.

Declared In

FMIceLinkStunServer.h

– disableTls

Gets whether to prevent the server from listening for TLS requests.
- (bool)disableTls

Discussion

Gets whether to prevent the server from listening for TLS requests.

Declared In

FMIceLinkStunServer.h

– disableUdp

Gets whether to prevent the server from listening for UDP requests.
- (bool)disableUdp

Discussion

Gets whether to prevent the server from listening for UDP requests.

Declared In

FMIceLinkStunServer.h

– getPrefixWithUdp:secure:

Gets a prefix.
- (NSString *)getPrefixWithUdp:(bool)udp secure:(bool)secure

Discussion

Gets a prefix.

Declared In

FMIceLinkStunServer.h

– init

- (instancetype)init

Declared In

FMIceLinkSerializable.h

– label

Gets the label.
- (NSString *)label

Discussion

Gets the label.

Declared In

FMIceLinkStunServer.h

– localTcpAddress

Gets the local TCP address.
- (FMIceLinkServerAddress *)localTcpAddress

Discussion

Gets the local TCP address.

Declared In

FMIceLinkStunServer.h

– localTcpAddresses

Gets the local TCP addresses.
- (NSMutableArray *)localTcpAddresses

Discussion

Gets the local TCP addresses.

Declared In

FMIceLinkStunServer.h

– localUdpAddress

Gets the local UDP address.
- (FMIceLinkServerAddress *)localUdpAddress

Discussion

Gets the local UDP address.

Declared In

FMIceLinkStunServer.h

– localUdpAddresses

Gets the local UDP addresses.
- (NSMutableArray *)localUdpAddresses

Discussion

Gets the local UDP addresses.

Declared In

FMIceLinkStunServer.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

FMIceLinkStunServer.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

FMIceLinkStunServer.h

– setCreateDatagramSocket:

Sets the create callback to create a datagram socket.
- (void)setCreateDatagramSocket:(FMIceLinkFunction1 *)value

Discussion

Sets the create callback to create a datagram socket.

Declared In

FMIceLinkStunServer.h

– setCreateDatagramSocketBlock

Sets the create callback to create a datagram socket.
- (void ( ^ ) ( FMIceLinkDatagramSocket *( ^ ) ( FMIceLinkDatagramSocketCreateArgs *) ))setCreateDatagramSocketBlock

Discussion

Sets the create callback to create a datagram socket.

Declared In

FMIceLinkStunServer.h

– setCreateDatagramSocketBlock:

Sets the create callback to create a datagram socket.
- (void)setCreateDatagramSocketBlock:(FMIceLinkDatagramSocket *( ^ ) ( FMIceLinkDatagramSocketCreateArgs *))valueBlock

Discussion

Sets the create callback to create a datagram socket.

Declared In

FMIceLinkStunServer.h

– setCreateStreamSocket:

Sets the create callback to create a stream socket.
- (void)setCreateStreamSocket:(FMIceLinkFunction1 *)value

Discussion

Sets the create callback to create a stream socket.

Declared In

FMIceLinkStunServer.h

– setCreateStreamSocketBlock

Sets the create callback to create a stream socket.
- (void ( ^ ) ( FMIceLinkStreamSocket *( ^ ) ( FMIceLinkStreamSocketCreateArgs *) ))setCreateStreamSocketBlock

Discussion

Sets the create callback to create a stream socket.

Declared In

FMIceLinkStunServer.h

– setCreateStreamSocketBlock:

Sets the create callback to create a stream socket.
- (void)setCreateStreamSocketBlock:(FMIceLinkStreamSocket *( ^ ) ( FMIceLinkStreamSocketCreateArgs *))valueBlock

Discussion

Sets the create callback to create a stream socket.

Declared In

FMIceLinkStunServer.h

– setDisableTcp:

Sets whether to prevent the server from listening for TCP requests.
- (void)setDisableTcp:(bool)value

Discussion

Sets whether to prevent the server from listening for TCP requests.

Declared In

FMIceLinkStunServer.h

– setDisableTls:

Sets whether to prevent the server from listening for TLS requests.
- (void)setDisableTls:(bool)value

Discussion

Sets whether to prevent the server from listening for TLS requests.

Declared In

FMIceLinkStunServer.h

– setDisableUdp:

Sets whether to prevent the server from listening for UDP requests.
- (void)setDisableUdp:(bool)value

Discussion

Sets whether to prevent the server from listening for UDP requests.

Declared In

FMIceLinkStunServer.h

– setStreamSendTimeout:

Sets timeout for asynchronous data sending over stream sockets in ms. Defaults to unset.
- (void)setStreamSendTimeout:(int)value

Discussion

Sets timeout for asynchronous data sending over stream sockets in ms. Defaults to unset.

Declared In

FMIceLinkStunServer.h

– start

Starts the server.
- (bool)start

Discussion

Starts the server.

Declared In

FMIceLinkStunServer.h

– startWithUdpAddresses:

Starts the server.
- (bool)startWithUdpAddresses:(NSMutableArray *)udpAddresses

Parameters

udpAddresses

The UDP addresses to listen on.

Discussion

Starts the server.

Declared In

FMIceLinkStunServer.h

– startWithUdpAddresses:tcpAddresses:

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

Parameters

udpAddresses

The UDP addresses to listen on.

tcpAddresses

The TCP addresses to listen on.

Discussion

Starts the server.

Declared In

FMIceLinkStunServer.h

– startWithUdpAddresses:tcpAddresses:tlsAddresses:

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

Parameters

udpAddresses

The UDP addresses to listen on.

tcpAddresses

The TCP addresses to listen on.

tlsAddresses

The TLS addresses to listen on.

Discussion

Starts the server.

Declared In

FMIceLinkStunServer.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

FMIceLinkStunServer.h

– stop

Stops the server.
- (bool)stop

Discussion

Stops the server.

Declared In

FMIceLinkStunServer.h

– streamSendTimeout

Gets timeout for asynchronous data sending over stream sockets in ms. Defaults to unset.
- (int)streamSendTimeout

Discussion

Gets timeout for asynchronous data sending over stream sockets in ms. Defaults to unset.

Declared In

FMIceLinkStunServer.h