listen

abstract fun listen(block: (socket: TcpSocket) -> Unit)

Starts a background coroutine that calls block on incoming connections. listen can only be called once.