trait SocketGroup[F[_]] extends AnyRef
Supports creation of client and server TCP sockets that all share an underlying non-blocking channel group.
- Source
- SocketGroup.scala
- Alphabetic
- By Inheritance
- SocketGroup
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
client(to: SocketAddress[Host], options: List[SocketOption] = List.empty): Resource[F, Socket[F]]
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.
- to
address of remote server
- options
socket options to apply to the underlying socket
-
abstract
def
server(address: Option[Host] = None, port: Option[Port] = None, options: List[SocketOption] = List.empty): 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.
- address
address to accept connections from; none for all interfaces
- port
port to bind
- options
socket options to apply to the underlying socket
-
abstract
def
serverResource(address: Option[Host] = None, port: Option[Port] = None, options: List[SocketOption] = List.empty): Resource[F, (SocketAddress[IpAddress], Stream[F, Socket[F]])]
Like server but provides the
SocketAddressof the bound server socket before providing accepted sockets.Like server but provides the
SocketAddressof the bound server socket before providing accepted sockets.Make sure to handle errors in the client socket Streams.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated