API reference
Preparing search index…

IpAddress

Immutable IP address value supporting IPv4 and IPv6.

Source & inheritance
Member directory21

Constructors

Properties

Methods

Constructors

Properties

Any: IpAddress = IpAddress.AnyV4

Compatibility alias for AnyV4.

Source & inheritance
AnyV4: IpAddress = ...

IPv4 wildcard interface address 0.0.0.0.

Source & inheritance
AnyV6: IpAddress = ...

IPv6 wildcard interface address ::.

Source & inheritance
Broadcast: IpAddress = IpAddress.BroadcastV4

Compatibility alias for BroadcastV4.

Source & inheritance
BroadcastV4: IpAddress = ...

IPv4 broadcast address 255.255.255.255.

Source & inheritance
LocalHost: IpAddress = IpAddress.LocalHostV4

Compatibility alias for LocalHostV4.

Source & inheritance
LocalHostV4: IpAddress = ...

IPv4 loopback address 127.0.0.1.

Source & inheritance
LocalHostV6: IpAddress = ...

IPv6 loopback address ::1.

Source & inheritance
Type: typeof IpAddressType = IpAddressType

Address family enumeration.

Source & inheritance

Methods

  • Return a 16-byte copy of IPv6 data; throw TypeError for IPv4 addresses.

    Returns

    Uint8Array
    Source & inheritance
  • Return the IPv4 network-order unsigned 32-bit integer; throw TypeError for IPv6 addresses.

    Returns

    number
    Source & inheritance
  • Parse an IP literal; do not resolve domain names or accept IPv6 zone IDs. Return undefined for invalid formats.

    Parameters

    address
    string

    Returns

    undefined | IpAddress
    Source & inheritance
  • Resolve a hostname asynchronously to its first IPv4 address. Return IP literals directly, or undefined on failure.

    Parameters

    hostname
    string

    Returns

    Promise<undefined | IpAddress>
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0