ktor-http-cio / io.ktor.server.cio.backend / ServerIncomingConnection

ServerIncomingConnection

class ServerIncomingConnection

Represents a server incoming connection. Usually it is a TCP connection but potentially could be other transport.

Constructors

<init>

ServerIncomingConnection(input: ByteReadChannel, output: ByteWriteChannel, remoteAddress: SocketAddress?)ServerIncomingConnection(input: ByteReadChannel, output: ByteWriteChannel, remoteAddress: SocketAddress?, localAddress: SocketAddress?)

Represents a server incoming connection. Usually it is a TCP connection but potentially could be other transport.

Properties

input

val input: ByteReadChannel

channel connected to incoming bytes end

localAddress

val localAddress: SocketAddress?

on which the client was accepted (optional)

output

val output: ByteWriteChannel

channel connected to outgoing bytes end

remoteAddress

val remoteAddress: SocketAddress?

of the client (optional)