Network

fs2.io.net.Network
See theNetwork companion object
sealed trait Network[F[_]] extends SocketGroup[F]

Attributes

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

Members list

Concise view

Value members

Abstract methods

Attributes

Source:
Network.scala

Inherited methods

Opens a TCP connection to the specified server.

Opens a TCP connection to the specified server.

The connection is closed when the resource is released.

Attributes

options

socket options to apply to the underlying socket

to

address of remote server

Inherited from:
SocketGroup
Source:
SocketGroup.scala
def server(address: Option[Host], port: Option[Port], options: List[SocketOption]): Stream[F, Socket[F]]

Creates a TCP server bound to specified address/port and returns a stream of client sockets -- one per client that connects to the bound address/port.

Creates a TCP server bound to specified address/port and returns a stream of client sockets -- one per client that connects to the bound address/port.

When the stream terminates, all open connections will terminate as well. Because of this, make sure to handle errors in the client socket Streams.

Attributes

address

address to accept connections from; none for all interfaces

options

socket options to apply to the underlying socket

port

port to bind

Inherited from:
SocketGroup
Source:
SocketGroup.scala

Like server but provides the SocketAddress of the bound server socket before providing accepted sockets.

Like server but provides the SocketAddress of the bound server socket before providing accepted sockets.

Make sure to handle errors in the client socket Streams.

Attributes

Inherited from:
SocketGroup
Source:
SocketGroup.scala