Ipv4Address
Representation of an IPv4 address that works on both the JVM and Scala.js.
- Companion
- object
Value members
Methods
Gets the IPv4 address after this address, with overflow from
255.255.255.255
to 0.0.0.0
.- Definition Classes
Gets the IPv4 address before this address, with underflow from
0.0.0.0
to 255.255.255.255
.- Definition Classes
Converts this V4 address to a compat V6 address, where the first 12 bytes are all zero
and the last 4 bytes contain the bytes of this V4 address.
and the last 4 bytes contain the bytes of this V4 address.
Converts this V4 address to a mapped V6 address, where the first 10 bytes are all zero,
the next two bytes are
the next two bytes are
ff
, and the last 4 bytes contain the bytes of this V4 address.Applies the supplied mask to this address.
- Example
- {{{
scala> ipv4"192.168.29.1".masked(ipv4"255.255.0.0")
res0: Ipv4Address = 192.168.0.0
}}}
Inherited methods
override def toInetAddress: Inet4Address
- Definition Classes
- Ipv4AddressPlatform -> IpAddressPlatform
- Inhertied from
- Ipv4AddressPlatform
Converts this address to a network order byte array of either 4 or 16 bytes.
- Inhertied from
- IpAddress
Converts this address to a source specific multicast address, as long as it is in the source specific multicast address range.
- Inhertied from
- IpAddress
def resolveOption[F <: ([_$2] =>> Any)](evidence$3: Dns[F], evidence$4: ApplicativeThrow[F]): F[Option[IpAddress]]
Resolves this host to an ip address using the platform DNS resolver.
If the host cannot be resolved, a
None
is returned.- Inhertied from
- HostPlatform
Converts this address to a multicast address, as long as it is in the multicast address range.
- Inhertied from
- IpAddress
def resolveAll[F <: ([_$4] =>> Any)](evidence$5: Dns[F], evidence$6: Applicative[F]): F[List[IpAddress]]
Resolves this host to all ip addresses known to the platform DNS resolver.
If the host cannot be resolved, an empty list is returned.
- Inhertied from
- HostPlatform