TcpServer

interface TcpServer : Closeable

Functions

Link copied to clipboard
abstract suspend fun address(): Address

Returns the local address the server is bound to. Only valid after calling listen

Link copied to clipboard
abstract override fun close()

Closes the server.

Link copied to clipboard
abstract fun listen(block: (socket: TcpSocket) -> Unit)

Starts listening and calls block when on incoming connections