Transport

interface Transport(source)

Transport abstraction for SSH connections.

This interface allows SSH to work over any byte stream transport, not just TCP sockets. Implementations could include:

  • TCP sockets (via Ktor or other libraries)

  • Unix domain sockets

  • Serial ports

  • Custom transport layers

Inheritors

Properties

Link copied to clipboard
abstract val isConnected: Boolean

Check if the transport is still connected.

Functions

Link copied to clipboard
abstract suspend fun close()

Close the transport connection.

Link copied to clipboard
abstract suspend fun read(count: Int): ByteArray

Read exactly count bytes from the transport.

Link copied to clipboard
abstract suspend fun write(data: ByteArray)

Write all bytes to the transport.