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

accept

suspend fun accept(): CoroutineSocketChannel (source)

Accepts a connection made to this channel's socket.

Exceptions

ClosedChannelException - If the channel is closed.

AsynchronousCloseException - If another thread closes this channel while the accept operation is in progress.

ClosedByInterruptException - If another thread interrupts the current thread while the accept operation is in progress, thereby closing the channel and setting the current thread's interrupt status.

NotYetBoundException - If this channel's socket has not yet been bound.

IOException - If an I/O error occurs.

Return
The socket channel for the new connection.