TcpSocket

class TcpSocket(val sendCtxt: CoroutineContext, val receiveCtxt: CoroutineContext)

Constructors

Link copied to clipboard
constructor(sendCtxt: CoroutineContext, receiveCtxt: CoroutineContext)

Properties

Link copied to clipboard

Returns number of bytes that can be read without blocking

Link copied to clipboard
var inp: <Error class: unknown class>?
Link copied to clipboard
open val localAddress: <Error class: unknown class>
Link copied to clipboard
var out: <Error class: unknown class>?
Link copied to clipboard
Link copied to clipboard
open val remoteAddress: <Error class: unknown class>
Link copied to clipboard
var selectorManager: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
var sock: <Error class: unknown class>?
Link copied to clipboard
var sockBuilder: <Error class: unknown class>

Functions

Link copied to clipboard
fun awaitContent(scope: <Error class: unknown class>, cb: () -> Unit)
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun connect(name: String, port: Int, connectTimeout: Int, sockOptions: <Error class: unknown class>.() -> Unit?)
Link copied to clipboard
open fun finalize()
Link copied to clipboard
open fun flush()

force any writes to actually be sent

Link copied to clipboard
open fun isAlive(): Boolean
Link copied to clipboard
open fun readAvailable(dst: ByteArray, offset: Int, length: Int): Int
Link copied to clipboard
open fun writeFully(src: ByteArray, offset: Int, length: Int)

Writes all src bytes and suspends until all bytes written. Causes flush if buffer filled up or when autoFlush Crashes if channel get closed while writing