TcpSocket

interface TcpSocket : Closeable

Functions

Link copied to clipboard
abstract override fun close()

Closes the socket.

Link copied to clipboard
abstract suspend fun receive(): ByteArray

Suspend until data is received and returns any available data

Link copied to clipboard
abstract fun send(data: ByteArray)

Schedules data to be sent.