FMLiveSwitchTransportAddress Class Reference

An IP address and port. More...

Instance Methods

(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...
 
(instancetype) - initWithIPAddress:port:
 Initializes a new instance of the FMLiveSwitchTransportAddress class. 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

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

Method Documentation

◆ addressType

- (FMLiveSwitchAddressType) addressType

Gets the address type.

◆ checkMaskWithAddress1:address2:mask:

+ (bool) checkMaskWithAddress1: (NSString *)  address1
address2: (NSString *)  address2
mask: (NSString *)  mask 

Compares two addresses to see if they are on the same subnet.

Parameters
address1The first address.
address2The second address.
maskThe subnet mask.

◆ description

- (NSString*) description

Returns a string that represents this instance.

Returns
A string that represents this instance.

◆ hash

- (int) hash

Returns a hash code for this instance.

Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

◆ initWithIPAddress:port:

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

Initializes a new instance of the FMLiveSwitchTransportAddress class.

Parameters
ipAddressThe IP address.
portThe port.

Implemented in FMLiveSwitchServerAddress.

◆ ipAddress

- (NSString*) ipAddress

Gets the IP address.

◆ is6To4WithIPAddress:

+ (bool) is6To4WithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a 6to4 address.

Parameters
ipAddressThe IP address.

◆ isAnyWithIPAddress:

+ (bool) isAnyWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is all zeros and represents "any" IP address.

Parameters
ipAddressThe IP address.

◆ isDiscardWithIPAddress:

+ (bool) isDiscardWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a discard address.

Parameters
ipAddressThe IP address.

◆ isDocumentationWithIPAddress:

+ (bool) isDocumentationWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a documentation address.

Parameters
ipAddressThe IP address.

◆ isEqualWithObj:

- (bool) isEqualWithObj: (id obj

Determines whether the specified object is equal to this instance.

Parameters
objThe object to compare with this instance.

◆ isIPAddress:

+ (bool) isIPAddress: (NSString *)  address

Determines whether a string is a valid IPv4 or IPv6 address.

Parameters
addressThe address.

◆ isIPv4WithIPAddress:

+ (bool) isIPv4WithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is IPv4.

Parameters
ipAddressThe IP address.
Returns
true if the specified IP address is IPv4; otherwise, false.

◆ isIPv6WithIPAddress:

+ (bool) isIPv6WithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is IPv6.

Parameters
ipAddressThe IP address.
Returns
true if the specified IP address is IPv6; otherwise, false.

◆ isLimitedBroadcastWithIPAddress:

+ (bool) isLimitedBroadcastWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a limited broadcast address.

Parameters
ipAddressThe IP address.

◆ isLinkLocalWithIPAddress:

+ (bool) isLinkLocalWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a link-local address.

Parameters
ipAddressThe IP address.

◆ isLoopbackWithIPAddress:

+ (bool) isLoopbackWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a loopback address.

Parameters
ipAddressThe IP address.

◆ isMulticastWithIPAddress:

+ (bool) isMulticastWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a multicast address.

Parameters
ipAddressThe IP address.

◆ isOrchidWithIPAddress:

+ (bool) isOrchidWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is an ORCHID address.

Parameters
ipAddressThe IP address.

◆ isPrivateWithIPAddress:

+ (bool) isPrivateWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a private address.

Parameters
ipAddressThe IP address.

◆ isReservedWithIPAddress:

+ (bool) isReservedWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a reserved address.

Parameters
ipAddressThe IP address.

◆ isSourceWithIPAddress:

+ (bool) isSourceWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a source address.

Parameters
ipAddressThe IP address.

◆ isTeredoWithIPAddress:

+ (bool) isTeredoWithIPAddress: (NSString *)  ipAddress

Determines whether the specified IP address is a Teredo address.

Parameters
ipAddressThe IP address.

◆ maskFromPrefixLength:

+ (NSString*) maskFromPrefixLength: (int)  prefixLength

Gets a subnet mask from an IPv4 prefix length (0-32).

Parameters
prefixLengthThe prefix length.

◆ maskFromPrefixLength:ipv6:

+ (NSString*) maskFromPrefixLength: (int)  prefixLength
ipv6: (bool)  ipv6 

Gets a subnet mask from an IPv4 or IPv6 prefix length (0-32 or 0-128).

Parameters
prefixLengthThe prefix length.
ipv6Whether to return an IPv6 mask.

◆ port

- (int) port

Gets the port.

◆ sanitizeIPAddress:

+ (NSString*) sanitizeIPAddress: (NSString *)  ipAddress

Sanitizes the IP address, removing any local information.

Parameters
ipAddressThe IP address to sanitize.

◆ setIPAddress:

- (void) setIPAddress: (NSString *)  value

Sets the IP address.

◆ setPort:

- (void) setPort: (int)  value

Sets the port.

◆ transportAddressWithIPAddress:port:

+ (FMLiveSwitchTransportAddress*) transportAddressWithIPAddress: (NSString *)  ipAddress
port: (int)  port 

Initializes a new instance of the FMLiveSwitchTransportAddress class.

Parameters
ipAddressThe IP address.
portThe port.