IDN

final class IDN extends Host

Internationalized domain name, as specified by RFC3490 and RFC5891.

This type models internationalized hostnames. An IDN provides unicode labels, a unicode string form, and an ASCII hostname form.

A well formed IDN consists of one or more labels separated by dots. Each label may contain unicode characters as long as the converted ASCII form meets the requirements of RFC1123 (e.g., 63 or fewer characters and no leading or trailing dash). A dot is represented as an ASCII period or one of the unicode dots: full stop, ideographic full stop, fullwidth full stop, halfwidth ideographic full stop.

The toString method returns the IDN in the form in which it was constructed. Sometimes it is useful to normalize the IDN -- converting all dots to an ASCII period and converting all labels to lowercase.

Note: equality and comparison of IDNs is case-sensitive. Consider comparing normalized toString values for a more lenient notion of equality.

Companion
object
trait Host
trait Ordered[Host]
trait Comparable[Host]
trait HostPlatform
class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(other: Any): Boolean
Definition Classes
Any
override def hashCode: Int
Definition Classes
Any

Converts this IDN to lower case and replaces dots with ASCII periods.

Converts this IDN to lower case and replaces dots with ASCII periods.

Inherited methods

def <(that: Host): Boolean
Inherited from
Ordered
def <=(that: Host): Boolean
Inherited from
Ordered
def >(that: Host): Boolean
Inherited from
Ordered
def >=(that: Host): Boolean
Inherited from
Ordered
def compare(that: Host): Int
Inherited from
Host
def compareTo(that: Host): Int
Inherited from
Ordered
def resolve[F[_]](implicit evidence$1: Dns[F], evidence$2: Applicative[F]): F[IpAddress]

Resolves this host to an ip address using the platform DNS resolver.

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.

Inherited from
HostPlatform
def resolveAll[F[_]](implicit evidence$5: Dns[F], evidence$6: Applicative[F]): F[List[IpAddress]]

Resolves this host to all ip addresses known to the platform DNS resolver.

Resolves this host to all ip addresses known to the platform DNS resolver.

If the host cannot be resolved, an empty list is returned.

Inherited from
HostPlatform
def resolveOption[F[_]](implicit evidence$3: Dns[F], evidence$4: ApplicativeThrow[F]): F[Option[IpAddress]]

Resolves this host to an ip address using the platform DNS resolver.

Resolves this host to an ip address using the platform DNS resolver.

If the host cannot be resolved, a None is returned.

Inherited from
HostPlatform

Concrete fields

val labels: List[Label]
override val toString: String