YLTCPUtils Class Reference
Inherits from | NSObject |
Declared in | YLTCPUtils.h |
Class Methods
broadcastAddressWithIp:subnetMask:
Compute and returns the broadcast address using a given ip and its subnet mask.
+ (NSString *)broadcastAddressWithIp:(NSString *)ip subnetMask:(NSString *)subnetMask
Parameters
- ip
An ip address.
- subnetMask
A subnet mask.
Availability
1.0.0
Discussion
E.g. with the 192.168.5.130
ip address and its associated
network mask 255.255.255.192
, the broadcast address is 192.168.5.191
.
It returns nil if something went wrong.
Declared In
YLTCPUtils.h
localIp
Returns the current device’s ip address on the network.
+ (NSString *)localIp
Availability
1.0.0
Discussion
E.g. 192.168.0.1
. It returns nil if something
went wrong.
Declared In
YLTCPUtils.h
localSubnetMask
Returns the subnet mask of the current device network.
+ (NSString *)localSubnetMask
Availability
1.0.0
Discussion
E.g. 255.255.255.0
. It returns nil if something
went wrong.
Declared In
YLTCPUtils.h
networkPrefixWithIp:subnetMask:
Compute and returns the network prefix using a given ip and its subnet mask.
+ (NSString *)networkPrefixWithIp:(NSString *)ip subnetMask:(NSString *)subnetMask
Parameters
- ip
An ip address.
- subnetMask
A subnet mask.
Availability
1.0.0
Discussion
E.g. with the 192.168.5.130
ip address and its associated
network mask 255.255.255.192
, the network prefix is 192.168.5.128
.
It returns nil if something went wrong.
Declared In
YLTCPUtils.h