sok / Sok.Socket.TCP / TCPServerSocket
expect class TCPServerSocket (source)
Class representing a listening socket. You can use it to perform accept() operation only.
| exceptionHandler | var exceptionHandler: (exception: Throwable) -> UnitLambda that will be called when an exception resulting in the closing of the socket is thrown, for further information look at the “Exception model” part of the README |
| isClosed | var isClosed: Booleankeep track of the socket state |
| accept | suspend fun accept(): TCPClientSocketAccept a client socket. The method will suspend until there is a client to accept |
| close | fun close(): Unitclose the server socket |