fs2.io.net

package fs2.io.net

Members list

Packages

package fs2.io.net.tls

Type members

Classlikes

class BindException(message: String, cause: Throwable) extends SocketException

Attributes

Companion
object
Source
NetException.scala
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object BindException

Attributes

Companion
class
Source
NetException.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class ConnectException(message: String, cause: Throwable) extends SocketException

Attributes

Companion
object
Source
NetException.scala
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
NetException.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Datagram(remote: SocketAddress[IpAddress], bytes: Chunk[Byte])

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.

Value parameters

bytes

data to send/receive

remote

remote party to send/receive datagram to/from

Attributes

Source
Datagram.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait DatagramSocket[F[_]]

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

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

Attributes

Companion
object
Source
DatagramSocket.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Source
DatagramSocket.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait DatagramSocketGroup[F[_]]

Attributes

Source
DatagramSocketGroup.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Network[F]
sealed trait DatagramSocketOption

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.

Attributes

Companion
object
Source
DatagramSocketOption.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Source
DatagramSocketOption.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Network[F[_]] extends SocketGroup[F], DatagramSocketGroup[F]

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

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

Attributes

Example

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.

Companion
object
Source
Network.scala
Supertypes
trait SocketGroup[F]
class Object
trait Matchable
class Any
object Network

Attributes

Companion
trait
Source
Network.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Network.type
class ProtocolException(message: String, cause: Throwable) extends IOException

Attributes

Source
NetException.scala
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait Socket[F[_]]

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

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

Attributes

Companion
object
Source
Socket.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait TLSSocket[F]
object Socket

Attributes

Companion
trait
Source
Socket.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Socket.type
class SocketException(message: String, cause: Throwable) extends IOException

Attributes

Companion
object
Source
NetException.scala
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
class
Source
NetException.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait SocketGroup[F[_]]

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

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

Attributes

Source
SocketGroup.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Network[F]
sealed trait SocketOption

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.

Attributes

Companion
object
Source
SocketOption.scala
Supertypes
class Object
trait Matchable
class Any
object SocketOption

Attributes

Companion
trait
Source
SocketOption.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Source
NetException.scala
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
NetException.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Source
NetException.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Deprecated classlikes

class UnknownHostException(message: String, cause: Throwable) extends UnknownHostException

Attributes

Companion
object
Deprecated
true
Source
NetException.scala
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all