SessionChannel

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val exitInfo: Deferred<SessionExit?>

Completes with how the remote process terminated once the server reports it (RFC 4254 section 6.10), or with null when the channel closes without an exit-status/exit-signal notification. Servers are not required to send one, so null means unknown, not failure.

Link copied to clipboard
open override val isOpen: Boolean
Link copied to clipboard
open override val localChannelNumber: Int
Link copied to clipboard
open override val remoteChannelNumber: Int
Link copied to clipboard
open override val stderr: ReceiveChannel<ByteArray>
Link copied to clipboard
open override val stdout: ReceiveChannel<ByteArray>

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend override fun read(): ByteArray?
Link copied to clipboard
open suspend override fun readExtended(): Pair<Int, ByteArray>?

Read non-stderr extended data. RFC 4254 data type 1 is exposed exclusively through stderr so the same remote bytes are not buffered twice.

Link copied to clipboard
open suspend override fun requestExec(command: String): Boolean

Request execution of a command on this session channel (RFC 4254 section 6.5).

Link copied to clipboard
open suspend override fun requestPty(terminalType: String = "xterm", widthChars: Int = 80, heightRows: Int = 24, widthPixels: Int = 0, heightPixels: Int = 0, terminalModes: ByteArray = byteArrayOf(0)): Boolean
Link copied to clipboard
open suspend override fun requestShell(): Boolean
Link copied to clipboard
open suspend override fun requestSubsystem(name: String): Boolean

Request a subsystem on this session channel (RFC 4254 section 6.5).

Link copied to clipboard
open suspend override fun resizeTerminal(widthChars: Int, heightRows: Int, widthPixels: Int, heightPixels: Int): Boolean
Link copied to clipboard
open suspend override fun sendEof()
Link copied to clipboard
open suspend override fun write(data: ByteArray)

Write data, suspending for channel window credit and transport backpressure.