TcpSocketJvm

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val availableForRead: Int

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 override val localAddress: SocketAddress
Link copied to clipboard
var out: <Error class: unknown class>?
Link copied to clipboard
open override val remoteAddress: SocketAddress
Link copied to clipboard
var sock: <Error class: unknown class>?
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Close the underlying connection

Link copied to clipboard
open override fun connect(name: String, port: Int, connectTimeout: Int, sockOptions: SocketOptions.() -> Unit?)

Attempt to connect

Link copied to clipboard
open override fun finalize()
Link copied to clipboard
open override fun flush()

force any writes to actually be sent

Link copied to clipboard
open override fun isAlive(): Boolean

Return true if the underlying connection is ok

Link copied to clipboard
open override fun readAvailable(dst: ByteArray, offset: Int, length: Int): Int

Reads all available bytes to dst buffer and returns immediately or suspends if no bytes available @return number of bytes were read or -1 if the channel has been closed

Link copied to clipboard
open override 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

Link copied to clipboard