Ipv6Address

final class Ipv6Address extends IpAddress with Ipv6AddressPlatform
Representation of an IPv6 address that works on both the JVM and Scala.js.
Companion
object
trait Ipv6AddressPlatform
class IpAddress
trait Serializable
trait Host
trait Ordered[Host]
trait Comparable[Host]
trait HostPlatform
trait IpAddressPlatform
class Object
trait Matchable
class Any

Value members

Methods

override def fold[A](v4: Ipv4Address => A, v6: Ipv6Address => A): A
Definition Classes
Definition Classes
override def toString: String
Returns the condensed string representation of the array per RFC5952.
Definition Classes
Any
def toUncondensedString: String
Returns an uncondensed string representation of the array.
def toMixedString: String
Converts this address to a string of form x:x:x:x:x:x:a.b.c.d where
each x represents 16-bits and a.b.c.d is IPv4 dotted decimal notation.
Consecutive 0 x fields are condensed with ::.
For example, the IPv4 address 127.0.0.1 can be converted to a compatible
IPv6 address via Ipv4Address#toCompatV6, which is represented as the string
::7f00:1 and the mixed string ::127.0.0.1.
Similarly, 127.0.0.1 can be converted to a mapped V6 address via Ipv4Address#toMappedV6,
resulting in ::ffff:7f00:1 and the mixed string ::ffff:127.0.0.1.
This format is described in RFC4291 section 2.2.3.
Example
{{{
scala> ipv6"::7f00:1".toMixedString
res0: String = ::127.0.0.1
scala> ipv6"ff3b:1234: :ffab:7f00:1".toMixedString
res0: String = ff3b:1234: :ffab:127.0.0.1
}}}
override def toUriString: String
Definition Classes
def toBigInt: BigInt
Converts this address to a 128-bit unsigned integer.
override def isMulticast: Boolean
Definition Classes
override def isSourceSpecificMulticast: Boolean
Definition Classes
Applies the supplied mask to this address.
Example
{{{
scala> ipv6"ff3b::1".masked(ipv6"fff0:: ")
res0: Ipv6Address = ff30::
}}}
Computes the last address in the network identified by applying the supplied mask to this address.
Example
{{{
scala> ipv6"ff3b::1".maskedLast(ipv6"fff0:: ")
res0: Ipv6Address = ff3f:ffff: ffff:ffff: ffff:ffff: ffff:ffff
}}}

Inherited methods

def >(that: A): Boolean
Inhertied from
Ordered
override def toInetAddress: Inet6Address
Definition Classes
Ipv6AddressPlatform -> IpAddressPlatform
Inhertied from
Ipv6AddressPlatform
def toBytes: Array[Byte]
Converts this address to a network order byte array of either 4 or 16 bytes.
Inhertied from
IpAddress
def asIpv4: Option[Ipv4Address]
Narrows this address to an Ipv4Address if that is the underlying type.
Inhertied from
IpAddress
def <(that: A): Boolean
Inhertied from
Ordered
def compareTo(that: A): Int
Inhertied from
Ordered
Converts this address to a source specific multicast address, as long as it is in the source specific multicast address range.
Inhertied from
IpAddress
Returns the version of this address.
Inhertied from
IpAddress
def asIpv6: Option[Ipv6Address]
Narrows this address to an Ipv6Address if that is the underlying type.
Inhertied from
IpAddress
def <=(that: A): Boolean
Inhertied from
Ordered
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 /(prefixBits: Int): Cidr[IpAddress]
Constructs a Cidr address from this address.
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
override def hashCode: Int
Definition Classes
IpAddress -> Any
Inhertied from
IpAddress
def >=(that: A): Boolean
Inhertied from
Ordered
def compare(that: Host): Int
Inhertied from
Host
def resolve[F <: ([_$1] =>> Any)](evidence$1: Dns[F], evidence$2: Applicative[F]): F[IpAddress]
Resolves this host to an ip address using the platform DNS resolver.
If the host cannot be resolved, the effect fails with a java.net.UnknownHostException.
Inhertied from
HostPlatform
override def equals(other: Any): Boolean
Definition Classes
IpAddress -> Any
Inhertied from
IpAddress