net-coroutines / org.apache.tuweni.net.coroutines / CoroutineServerSocketChannel

CoroutineServerSocketChannel

class CoroutineServerSocketChannel : CoroutineNetworkChannel (source)

A co-routine based network channel for stream-oriented connection listening.

Functions

accept

Accepts a connection made to this channel's socket.

suspend fun accept(): CoroutineSocketChannel

bind

Binds the channel's socket to a local address and configures the socket to listen for connections.

fun bind(local: SocketAddress?): CoroutineServerSocketChannel
fun bind(local: SocketAddress?, backlog: Int): CoroutineServerSocketChannel

close

Closes this channel.

fun close(): Unit

Companion Object Functions

open

Opens a server-socket channel.

fun open(group: CoroutineChannelGroup = CommonCoroutineGroup): CoroutineServerSocketChannel