package net
- Alphabetic
- By Inheritance
- net
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package tls
- package unixsocket
Type Members
- type BindException = java.net.BindException
- type ConnectException = java.net.ConnectException
- 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
- trait DatagramSocket[F[_]] extends DatagramSocketPlatform[F]
Provides the ability to read/write from a UDP socket in the effect
F
. - trait DatagramSocketGroup[F[_]] extends AnyRef
- type DatagramSocketOption = SocketOption
- 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.
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 tosend
requires theNetwork
constraint instead of requiring the much more powerfulAsync
constraint. TheNetwork
instance has a set of global resources used for managing sockets. Alternatively, use thesocketGroup
anddatagramSocketGroup
operations to manage the lifecycle of underlying resources. An instance ofNetwork
is available for any effectF
which has anAsync[F]
instance.
Example: - type ProtocolException = java.net.ProtocolException
- trait Socket[F[_]] extends AnyRef
Provides the ability to read/write from a TCP socket in the effect
F
. - type SocketException = java.net.SocketException
- trait SocketGroup[F[_]] extends AnyRef
Supports creation of client and server TCP sockets that all share an underlying non-blocking channel group.
- 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 onStandardSocketOptions
for details on each. - type SocketTimeoutException = java.net.SocketTimeoutException
Deprecated Type Members
- type UnknownHostException = java.net.UnknownHostException
- Annotations
- @deprecated
- Deprecated
(Since version 3.2.0) Use ip4s.UnknownHostException instead
Value Members
- val DatagramSocketOption: SocketOption.type
- object DatagramSocket extends DatagramSocketCompanionPlatform
- object Network extends NetworkCompanionPlatform
- object Socket extends SocketCompanionPlatform
- object SocketOption extends SocketOptionCompanionPlatform