Connection

class Connection

Represents a connected socket with its input and output

Constructors

<init>

Connection(
    socket: Socket,
    input: ByteReadChannel,
    output: ByteWriteChannel)

Represents a connected socket with its input and output

Properties

input

val input: ByteReadChannel

output

val output: ByteWriteChannel

socket

val socket: Socket

Extension Functions

tls

suspend fun Connection.tls(
    coroutineContext: <ERROR CLASS>,
    config: TLSConfig
): Socket

Make Socket connection secure with TLS using TLSConfig.

suspend fun Connection.tls(
    coroutineContext: <ERROR CLASS>
): Socket

Make Socket connection secure with TLS.

suspend fun Connection.tls(
    coroutineContext: <ERROR CLASS>,
    block: TLSConfigBuilder.() -> Unit
): Socket

Make Socket connection secure with TLS configured with block.