Packages

package net

Provides support for doing network I/O -- TCP, UDP, and TLS.

Source
net.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. net
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package tls
  2. package unixsocket

Type Members

  1. type BindException = java.net.BindException
  2. type ConnectException = java.net.ConnectException
  3. final case class Datagram(remote: SocketAddress[IpAddress], bytes: Chunk[Byte]) extends Product with Serializable

    A single datagram to send to the specified remote address or received from the specified address.

    A single datagram to send to the specified remote address or received from the specified address.

    remote

    remote party to send/receive datagram to/from

    bytes

    data to send/receive

  4. trait DatagramSocket[F[_]] extends DatagramSocketPlatform[F]

    Provides the ability to read/write from a UDP socket in the effect F.

  5. trait DatagramSocketGroup[F[_]] extends AnyRef
  6. type DatagramSocketOption = SocketOption
  7. sealed trait Network[F[_]] extends NetworkPlatform[F] with SocketGroup[F] with DatagramSocketGroup[F]

    Provides the ability to work with TCP, UDP, and TLS.

    Provides the ability to work with TCP, UDP, and TLS.

    Example:
    1. import fs2.Stream
      import fs2.io.net.{Datagram, Network}
      
      def send[F[_]: Network](datagram: Datagram): F[Unit] =
        Network[F].openDatagramSocket().use { socket =>
          socket.write(packet)
        }

      In this example, the F[_] parameter to send requires the Network constraint instead of requiring the much more powerful Async constraint. The Network instance has a set of global resources used for managing sockets. Alternatively, use the socketGroup and datagramSocketGroup operations to manage the lifecycle of underlying resources. An instance of Network is available for any effect F which has an Async[F] instance.

  8. type ProtocolException = java.net.ProtocolException
  9. trait Socket[F[_]] extends AnyRef

    Provides the ability to read/write from a TCP socket in the effect F.

  10. type SocketException = java.net.SocketException
  11. trait SocketGroup[F[_]] extends AnyRef

    Supports creation of client and server TCP sockets that all share an underlying non-blocking channel group.

  12. sealed trait SocketOption extends AnyRef

    Specifies a socket option on a TCP/UDP socket.

    Specifies a socket option on a TCP/UDP socket.

    The companion provides methods for creating a socket option from each of the JDK java.net.StandardSocketOptions as well as the ability to construct arbitrary additional options. See the docs on StandardSocketOptions for details on each.

  13. type SocketTimeoutException = java.net.SocketTimeoutException

Deprecated Type Members

  1. type UnknownHostException = java.net.UnknownHostException
    Annotations
    @deprecated
    Deprecated

    (Since version 3.2.0) Use ip4s.UnknownHostException instead

Value Members

  1. val DatagramSocketOption: SocketOption.type
  2. object DatagramSocket extends DatagramSocketCompanionPlatform
  3. object Network extends NetworkCompanionPlatform
  4. object Socket extends SocketCompanionPlatform
  5. object SocketOption extends SocketOptionCompanionPlatform

Inherited from AnyRef

Inherited from Any

Ungrouped