interface Socket : ReadWriteSocket, ABoundSocket, AConnectedSocket
Represents a connected socket
abstract val localAddress: <ERROR CLASS>
Local socket address. Could throw an exception if no address bound yet. |
|
abstract val remoteAddress: <ERROR CLASS>
Remote socket address. Could throw an exception if the peer is not yet connected or already disconnected. |
val ASocket.isClosed: Boolean
Check if the socket is closed |
suspend fun ASocket.awaitClosed(): Unit
Await until socket close |
|
fun Socket.connection(): Connection
Opens socket input and output channels and returns connection object |
|
fun AReadable.openReadChannel(): ByteReadChannel
Open a read channel, could be done only once |
|
fun AWritable.openWriteChannel(autoFlush: Boolean = false): ByteWriteChannel
Open a write channel, could be opened only once |