com.comcast.ip4s

Members list

Concise view

Type members

Classlikes

final case class AnySourceMulticastJoin[+A <: IpAddress](group: Multicast[A]) extends MulticastJoin[A]

Multicast join to a group without a source filter.

Multicast join to a group without a source filter.

Attributes

Companion:
object
Source:
MulticastJoin.scala
Graph
Supertypes
class MulticastJoin[A]
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
MulticastJoin.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final class Cidr[+A <: IpAddress] extends Product with Serializable

Classless Inter-Domain Routing address, which represents an IP address and its routing prefix.

Classless Inter-Domain Routing address, which represents an IP address and its routing prefix.

Attributes

address

IP address for which this CIDR refers to

prefixBits

number of leading 1s in the routing mask

Companion:
object
Source:
Cidr.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
object Cidr

Attributes

Companion:
class
Source:
Cidr.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Cidr.type
sealed trait Dns[F[_]]

Capability for an effect F[_] which can do DNS lookups.

Capability for an effect F[_] which can do DNS lookups.

An instance is available for any effect which has a Sync instance on JVM and Async on Node.js.

Attributes

Companion:
object
Source:
Dns.scala
Graph
Supertypes
class Object
trait Matchable
class Any
object Dns

Attributes

Companion:
trait
Source:
Dns.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Dns.type
sealed trait Host extends Ordered[Host]

ADT representing either an IpAddress, Hostname, or IDN.

ADT representing either an IpAddress, Hostname, or IDN.

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
trait Ordered[Host]
class Object
trait Matchable
class Any
Known subtypes
class Hostname
class IDN
class IpAddress
object Host

Attributes

Companion:
trait
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Host.type
final class Hostname extends Host

RFC1123 compliant hostname.

RFC1123 compliant hostname.

A hostname contains one or more labels, where each label consists of letters A-Z, a-z, digits 0-9, or a dash. A label may not start or end in a dash and may not exceed 63 characters in length. Labels are separated by periods and the overall hostname must not exceed 253 characters in length.

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
trait Host
trait Ordered[Host]
class Object
trait Matchable
class Any
object Hostname

Attributes

Companion:
class
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class IDN extends Host

Internationalized domain name, as specified by RFC3490 and RFC5891.

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.

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
trait Host
trait Ordered[Host]
class Object
trait Matchable
class Any
object IDN

Attributes

Companion:
class
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
IDN.type
sealed abstract class IpAddress extends Host with Serializable

Immutable and safe representation of an IP address, either V4 or V6.

Immutable and safe representation of an IP address, either V4 or V6.

===Construction===

IpAddress instances are constructed in a few different ways:

  • via IpAddress("127.0.0.1"), which parses a string representation of the IP and returns an Option[IpAddress]
  • via IpAddress.fromBytes(arr), which returns an IP address if the supplied array is either exactly 4 bytes or exactly 16 bytes
  • via literal syntax like ip"127.0.0.1", which returns an IpAddress and fails to compile if the IP is invalid.

===Type Hierarchy===

There are two subtypes of IpAddress -- Ipv4Address and Ipv6Address. Each of these subtypes have a richer API than IpAddress and it is often useful to use those types directly, for example if your use case requires a V6 address. It is safe to pattern match on IpAddress to access Ipv4Address or Ipv6Address directly, or alternatively, you can use fold.

===JVM Specific API===

If using IpAddress on the JVM, you can call toInetAddress to convert the address to a java.net.InetAddress, for use with networking libraries. This method does not exist on the Scala.js version.

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
trait Host
trait Ordered[Host]
class Object
trait Matchable
class Any
Known subtypes
object IpAddress

Attributes

Companion:
class
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait IpVersion

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object V4.type
object V6.type
object IpVersion

Attributes

Companion:
trait
Source:
Host.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final class Ipv4Address extends IpAddress

Representation of an IPv4 address that works on both the JVM and Scala.js.

Representation of an IPv4 address that works on both the JVM and Scala.js.

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
class IpAddress
trait Host
trait Ordered[Host]
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class Ipv6Address extends IpAddress

Representation of an IPv6 address that works on both the JVM and Scala.js.

Representation of an IPv6 address that works on both the JVM and Scala.js.

Attributes

Companion:
object
Source:
Host.scala
Graph
Supertypes
class IpAddress
trait Host
trait Ordered[Host]
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
Host.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Literals

Attributes

Source:
Literals.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Source:
DnsPlatform.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class MacAddress extends Ordered[MacAddress] with Serializable

6-byte MAC address.

6-byte MAC address.

Attributes

Companion:
object
Source:
MacAddress.scala
Graph
Supertypes
class Object
trait Matchable
class Any
object MacAddress

Attributes

Companion:
class
Source:
MacAddress.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Multicast[+A <: IpAddress] extends Product with Serializable

Witness that the wrapped address of type A is a multicast address.

Witness that the wrapped address of type A is a multicast address.

An instance of Multicast is typically created by either calling Multicast.apply or by using the asMulticast method on IpAddress.

Attributes

Companion:
object
Source:
Multicast.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
object Multicast

Attributes

Companion:
trait
Source:
Multicast.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class MulticastJoin[+A <: IpAddress] extends Product with Serializable

Represents a join of a multicast group.

Represents a join of a multicast group.

This is represented as an ADT consisting of two constructors, AnySourceMulticastJoin and SourceSpecificMulticastJoin. These constructors are provided as top level types to allow domain modeling where a specific join type is required. The address type is parameterized for a similar reason -- to allow domain modeling where a specific address type is required.

Attributes

Companion:
object
Source:
MulticastJoin.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
class
Source:
MulticastJoin.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class MulticastSocketAddress[J <: ([x <: IpAddress] =>> MulticastJoin[x]), +A <: IpAddress](join: J[A], port: Port)

A multicast join of the specified type and a port number. Used to describe UDP join of a multicast group.

A multicast join of the specified type and a port number. Used to describe UDP join of a multicast group.

Attributes

Companion:
object
Source:
MulticastSocketAddress.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
MulticastSocketAddress.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final class Port extends Product with Serializable with Ordered[Port]

TCP or UDP port number.

TCP or UDP port number.

Attributes

Companion:
object
Source:
Port.scala
Graph
Supertypes
trait Ordered[Port]
trait Product
trait Equals
class Object
trait Matchable
class Any
object Port

Attributes

Companion:
class
Source:
Port.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Port.type
final case class SocketAddress[+A <: Host](host: A, port: Port)

An IP address of the specified type and a port number. Used to describe the source or destination of a socket.

An IP address of the specified type and a port number. Used to describe the source or destination of a socket.

Attributes

Companion:
object
Source:
SocketAddress.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
SocketAddress.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait SourceSpecificMulticast[+A <: IpAddress] extends Multicast[A]

Witnesses that the wrapped address of type A is a source specific multicast address.

Witnesses that the wrapped address of type A is a source specific multicast address.

An instance of SourceSpecificMulticast is typically created by either calling Multicast.apply or by using asSourceSpecificMulticast and asSourceSpecificMulticastLenient methods on IpAddress.

Attributes

Companion:
object
Source:
Multicast.scala
Graph
Supertypes
trait Multicast[A]
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
trait Strict[A]

Attributes

Companion:
trait
Source:
Multicast.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final case class SourceSpecificMulticastJoin[+A <: IpAddress](source: A, group: SourceSpecificMulticast[A]) extends MulticastJoin[A]

Multicast join to a group from the specified source.

Multicast join to a group from the specified source.

Attributes

Companion:
object
Source:
MulticastJoin.scala
Graph
Supertypes
class MulticastJoin[A]
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
class
Source:
MulticastJoin.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class UnknownHostException(message: String, cause: Throwable) extends IOException

Attributes

Source:
UnknownHostException.scala
Graph
Supertypes
class Exception
class Throwable
class Object
trait Matchable
class Any

Extensions

Extensions

extension (ctx: StringContext)
inline def host(inline args: Any*): Hostname

Attributes

Source:
Literals.scala
inline def idn(inline args: Any*): IDN

Attributes

Source:
Literals.scala
inline def ip(inline args: Any*): IpAddress

Attributes

Source:
Literals.scala
inline def ipv4(inline args: Any*): Ipv4Address

Attributes

Source:
Literals.scala
inline def ipv6(inline args: Any*): Ipv6Address

Attributes

Source:
Literals.scala
inline def mip(inline args: Any*): Multicast[IpAddress]

Attributes

Source:
Literals.scala
inline def mipv4(inline args: Any*): Multicast[Ipv4Address]

Attributes

Source:
Literals.scala
inline def mipv6(inline args: Any*): Multicast[Ipv6Address]

Attributes

Source:
Literals.scala
inline def port(inline args: Any*): Port

Attributes

Source:
Literals.scala
inline def ssmip(inline args: Any*): Strict[IpAddress]

Attributes

Source:
Literals.scala
inline def ssmipv4(inline args: Any*): Strict[Ipv4Address]

Attributes

Source:
Literals.scala
inline def ssmipv6(inline args: Any*): Strict[Ipv6Address]

Attributes

Source:
Literals.scala