FMLiveSwitchServerAddress Class Reference

An IP address and port, along with optional public IP addresses for listening behind a 1:1 NAT. More...

Instance Methods

(instancetype) - initWithIPAddress:port:
 Initializes a new instance of the FMLiveSwitchServerAddress class. More...
 
(instancetype) - initWithIPAddress:port:publicIPAddress:
 Initializes a new instance of the FMLiveSwitchServerAddress class. More...
 
(instancetype) - initWithIPAddress:port:publicIPAddresses:
 Initializes a new instance of the FMLiveSwitchServerAddress class. More...
 
(NSString *) - publicIPAddress
 Gets the first public IP address. More...
 
(NSMutableArray *) - publicIPAddresses
 Gets the public IP addresses. More...
 
- Instance Methods inherited from FMLiveSwitchTransportAddress
(FMLiveSwitchAddressType) - addressType
 Gets the address type. More...
 
(NSString *) - description
 Returns a string that represents this instance. More...
 
(int) - hash
 Returns a hash code for this instance. More...
 
(NSString *) - ipAddress
 Gets the IP address. More...
 
(bool) - isEqualWithObj:
 Determines whether the specified object is equal to this instance. More...
 
(int) - port
 Gets the port. More...
 
(void) - setIPAddress:
 Sets the IP address. More...
 
(void) - setPort:
 Sets the port. More...
 

Class Methods

(FMLiveSwitchServerAddress *) + serverAddressWithIPAddress:port:
 Initializes a new instance of the FMLiveSwitchServerAddress class. More...
 
(FMLiveSwitchServerAddress *) + serverAddressWithIPAddress:port:publicIPAddress:
 Initializes a new instance of the FMLiveSwitchServerAddress class. More...
 
(FMLiveSwitchServerAddress *) + serverAddressWithIPAddress:port:publicIPAddresses:
 Initializes a new instance of the FMLiveSwitchServerAddress class. More...
 
- Class Methods inherited from FMLiveSwitchTransportAddress
(bool) + checkMaskWithAddress1:address2:mask:
 Compares two addresses to see if they are on the same subnet. More...
 
(bool) + is6To4WithIPAddress:
 Determines whether the specified IP address is a 6to4 address. More...
 
(bool) + isAnyWithIPAddress:
 Determines whether the specified IP address is all zeros and represents "any" IP address. More...
 
(bool) + isDiscardWithIPAddress:
 Determines whether the specified IP address is a discard address. More...
 
(bool) + isDocumentationWithIPAddress:
 Determines whether the specified IP address is a documentation address. More...
 
(bool) + isIPAddress:
 Determines whether a string is a valid IPv4 or IPv6 address. More...
 
(bool) + isIPv4WithIPAddress:
 Determines whether the specified IP address is IPv4. More...
 
(bool) + isIPv6WithIPAddress:
 Determines whether the specified IP address is IPv6. More...
 
(bool) + isLimitedBroadcastWithIPAddress:
 Determines whether the specified IP address is a limited broadcast address. More...
 
(bool) + isLinkLocalWithIPAddress:
 Determines whether the specified IP address is a link-local address. More...
 
(bool) + isLoopbackWithIPAddress:
 Determines whether the specified IP address is a loopback address. More...
 
(bool) + isMulticastWithIPAddress:
 Determines whether the specified IP address is a multicast address. More...
 
(bool) + isOrchidWithIPAddress:
 Determines whether the specified IP address is an ORCHID address. More...
 
(bool) + isPrivateWithIPAddress:
 Determines whether the specified IP address is a private address. More...
 
(bool) + isReservedWithIPAddress:
 Determines whether the specified IP address is a reserved address. More...
 
(bool) + isSourceWithIPAddress:
 Determines whether the specified IP address is a source address. More...
 
(bool) + isTeredoWithIPAddress:
 Determines whether the specified IP address is a Teredo address. More...
 
(NSString *) + maskFromPrefixLength:
 Gets a subnet mask from an IPv4 prefix length (0-32). More...
 
(NSString *) + maskFromPrefixLength:ipv6:
 Gets a subnet mask from an IPv4 or IPv6 prefix length (0-32 or 0-128). More...
 
(NSString *) + sanitizeIPAddress:
 Sanitizes the IP address, removing any local information. More...
 
(FMLiveSwitchTransportAddress *) + transportAddressWithIPAddress:port:
 Initializes a new instance of the FMLiveSwitchTransportAddress class. More...
 

Detailed Description

An IP address and port, along with optional public IP addresses for listening behind a 1:1 NAT.

Method Documentation

◆ initWithIPAddress:port:

- (instancetype) initWithIPAddress: (NSString *)  ipAddress
port: (int)  port 

Initializes a new instance of the FMLiveSwitchServerAddress class.

Parameters
ipAddressThe IP address.
portThe port.

Implements FMLiveSwitchTransportAddress.

◆ initWithIPAddress:port:publicIPAddress:

- (instancetype) initWithIPAddress: (NSString *)  ipAddress
port: (int)  port
publicIPAddress: (NSString *)  publicIPAddress 

Initializes a new instance of the FMLiveSwitchServerAddress class.

Parameters
ipAddressThe IP address.
portThe port.
publicIPAddressThe public IP address.

◆ initWithIPAddress:port:publicIPAddresses:

- (instancetype) initWithIPAddress: (NSString *)  ipAddress
port: (int)  port
publicIPAddresses: (NSMutableArray *)  publicIPAddresses 

Initializes a new instance of the FMLiveSwitchServerAddress class.

Parameters
ipAddressThe IP address.
portThe port.
publicIPAddressesThe public IP addresses.

◆ publicIPAddress

- (NSString*) publicIPAddress

Gets the first public IP address.

◆ publicIPAddresses

- (NSMutableArray*) publicIPAddresses

Gets the public IP addresses.

◆ serverAddressWithIPAddress:port:

+ (FMLiveSwitchServerAddress*) serverAddressWithIPAddress: (NSString *)  ipAddress
port: (int)  port 

Initializes a new instance of the FMLiveSwitchServerAddress class.

Parameters
ipAddressThe IP address.
portThe port.

◆ serverAddressWithIPAddress:port:publicIPAddress:

+ (FMLiveSwitchServerAddress*) serverAddressWithIPAddress: (NSString *)  ipAddress
port: (int)  port
publicIPAddress: (NSString *)  publicIPAddress 

Initializes a new instance of the FMLiveSwitchServerAddress class.

Parameters
ipAddressThe IP address.
portThe port.
publicIPAddressThe public IP address.

◆ serverAddressWithIPAddress:port:publicIPAddresses:

+ (FMLiveSwitchServerAddress*) serverAddressWithIPAddress: (NSString *)  ipAddress
port: (int)  port
publicIPAddresses: (NSMutableArray *)  publicIPAddresses 

Initializes a new instance of the FMLiveSwitchServerAddress class.

Parameters
ipAddressThe IP address.
portThe port.
publicIPAddressesThe public IP addresses.