accept Suspend
suspend fun AsynchronousServerSocketChannel.acceptSuspend(timeout: Long? = null): AsynchronousSocketChannel
Suspends the coroutine and accepts a connection from the AsynchronousServerSocketChannel
.
Return
The AsynchronousSocketChannel
representing the accepted connection.
Parameters
timeout
The timeout in milliseconds to wait for a connection. If null
, the function will wait indefinitely.
Throws
if the timeout is reached before a connection is accepted.