net/Address

class IPAddress
extends:Object
method isBroadcastBool

Returns true if the address is a broadcast address.

Only IPv4 addresses can be broadcast addresses. All bits are one. IPv6 addresses always return false.

method isWildcardBool
Returns true if the address is a wildcard (all zeros) address.
method isGlobalMulticastBool

Return true if the address is a global multicast address.

IPv4 most be in the 224.0.1.0 to 238.255.255.255 range. IPv6 most be in the FFxF:x:x:x:x:x:x:x range.

method isIP4CompatibleBool

Returns true if the address is IPv4 compatible.

IPv4 addresses always return true. IPv6 address must be in the ::x:x range (first 96 bits are zero).

method isIP4MappedBool

Returns true if the address is an IPv4 mapped IPv6 address.

IPv4 addresses always return true. IPv6 addresses must be in the ::FFFF:x:x range.

method isLinkLocalBool

Returns true if the address is a link local unicast address.

IPv4 addresses are in the 169.254.0.0/16 range (RFC 3927). IPv6 addresses have 1111 1110 10 as the first 10 bits, followed by 54 zeros.

method isLinkLocalMulticastBool

Returns true if the address is a link local multicast address.

IPv4 addresses are in the 224.0.0.0/24 range. Note that this overlaps with the range for well-known multicast addresses.

method isLoopbackBool

Returns true if the address is a loopback address.

IPv4 address must be 127.0.0.1 IPv6 address must be ::1

method isMulticastBool

Returns true if the address is a multicast address.

IPv4 addresses must be in the 224.0.0.0 to 239.255.255.255 range (the first four bits have the value 1110). IPv6 addresses are in the FFxx:x:x:x:x:x:x:x range.

method isNodeLocalMulticastBool

Returns true if the address is a node-local multicast address.

IPv4 does not support node-local multicast and will always return false. IPv6 addresses must be in the FFx1:x:x:x:x:x:x:x range.

method isOrgLocalMulticastBool

Returns true if the address is an organization-local multicast address.

IPv4 addresses must be in the 239.192.0.0/16 range. IPv6 addresses must be in the FFx8:x:x:x:x:x:x:x range.

method isSiteLocalBool

Returns true if the address is a site-local unicast address.

IPv4 addresses are in on of the 10.0.0.0/24, 192.168.0.0/16 or 172.16.0.0 to 172.31.255.255 ranges. IPv6 addresses have 1111 1110 11 as the first 10 bits, followed by 38 zeros.

method isSiteLocalMulticastBool

Returns true if the address is a site-local multicast address.

IPv4 addresses are in the 239.255.0.0/16 range. IPv6 addresses are in the FFx5:x:x:x:x:x:x:x range.

method isUnicastBool

Returns true if the address is an unicast address.

An address is unicast if it is neither a wildcard, broadcast, or multicast.

method isWellKnownMulticastBool

Returns true if the address is a well-known multicast address.

IPv4 addresses are in the 224.0.0.0/8 range. IPv6 addresses are in the FF0x:x:x:x:x:x:x:x range.

method mask(mask: IPAddress)
Masks the IP address using the given netmask, which is usually a IPv4 subnet mask. Only supported for IPv4 addresses. The new address is (address & mask).
method mask~withSet(mask, set: IPAddress)

Masks the IP address using the given netmask, which is usually a IPv4 subnet mask. Only supported for IPv4 addresses.

The new address is (address & mask) | (set & mask).

method toStringString
Returns a string representation of the address in presentation format.
familyInt
class IP4Address
extends:IPAddress
static method new(ipAddress: String)IP4Address
method init(ipAddress: String)
static method new~wildcardIP4Address
method init~wildcard
static method new~withAddr(addr: InAddr)IP4Address
method init~withAddr(addr: InAddr)
method isBroadcastBool
method isWildcardBool
method isGlobalMulticastBool
method isIP4CompatibleBool
method isIP4MappedBool
method isLinkLocalBool
method isLinkLocalMulticastBool
method isLoopbackBool
method isMulticastBool
method isNodeLocalMulticastBool
method isOrgLocalMulticastBool
method isSiteLocalBool
method isSiteLocalMulticastBool
method isWellKnownMulticastBool
method mask(mask: IPAddress)
method mask~withSet(mask, set: IPAddress)
method toStringString
aiInAddr
class IP6Address
extends:IPAddress
static method new(ipAddress: String)IP6Address
method init(ipAddress: String)
static method new~withAddr(addr: In6Addr)IP6Address
method init~withAddr(addr: In6Addr)
method toWordsUInt16 *
method isBroadcastBool
method isWildcardBool
method isGlobalMulticastBool
method isIP4CompatibleBool
method isIP4MappedBool
method isLinkLocalBool
method isLinkLocalMulticastBool
method isLoopbackBool
method isMulticastBool
method isNodeLocalMulticastBool
method isOrgLocalMulticastBool
method isSiteLocalBool
method isSiteLocalMulticastBool
method isWellKnownMulticastBool
method mask(mask: IPAddress)
method mask~withSet(mask, set: IPAddress)
method toStringString
aiIn6Addr
class SocketAddress
extends:Object
static method new(host: IPAddress, port: Int)SocketAddress
static method newFromSock(addr: SockAddr *, len: UInt)SocketAddress
method familyInt
method hostIPAddress
method portInt
method addrSockAddr *
method lengthUInt32
method toStringString
class SocketAddressIP4
extends:SocketAddress
static method new(addr: InAddr, port: Int)SocketAddressIP4
method init(addr: InAddr, port: Int)
static method new~sock(sockAddr: SockAddrIn *)SocketAddressIP4
method init~sock(sockAddr: SockAddrIn *)
method familyInt
method hostIPAddress
method portInt
method addrSockAddr *
method lengthUInt32
saSockAddrIn
class SocketAddressIP6
extends:SocketAddress
static method new(addr: In6Addr, port: Int)SocketAddressIP6
method init(addr: In6Addr, port: Int)
static method new~sock6(sockAddr: SockAddrIn6 *)SocketAddressIP6
method init~sock6(sockAddr: SockAddrIn6 *)
method familyInt
method hostIPAddress
method portInt
method addrSockAddr *
method lengthUInt32
saSockAddrIn6

This Page