interface Acceptable<out S : ASocket> : ASocket
Represents a socket source, for example server socket
abstract val socketContext: Job
Represents a socket lifetime, completes at socket closure |
abstract suspend fun accept(): S
accepts socket connection or suspends if none yet available. |
open fun dispose(): Unit |
val ASocket.isClosed: Boolean
Check if the socket is closed |
suspend fun ASocket.awaitClosed(): Unit
Await until socket close |
interface ServerSocket : ASocket, ABoundSocket, Acceptable<Socket>
Represents a server bound socket ready for accepting connections |