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

suspend fun accept(): CoroutineSocketChannel

Accepts a connection made to this channel's socket.

bind

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

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

close

fun close(): Unit

Closes this channel.

Companion Object Functions

open

fun open(group: CoroutineChannelGroup = CommonCoroutineGroup): CoroutineServerSocketChannel

Opens a server-socket channel.