SocketTerminalBackend class

Socket-backed backend for remote/shell-mode terminal hosts.

This backend treats OSC 9999;<cols>;<rows> as an out-of-band size update, updates size, emits on resizeStream, and removes that control sequence from the normal input stream before the TUI parser sees it.

Implemented types

Constructors

SocketTerminalBackend(Socket socket, {TerminalDimensions initialSize = (width: 80, height: 24), bool supportsAnsi = true, bool isTerminal = false, ColorProfile colorProfile = ColorProfile.trueColor, bool closeSocketOnDispose = true})
Creates a socket-backed backend.

Properties

closeSocketOnDispose bool
Whether the socket should be closed when the backend is disposed.
final
colorProfile ColorProfile
Detected or assumed color profile for the remote surface.
final
hashCode int
The hash code for this object.
no setterinherited
inputStream Stream<List<int>>?
Stream of raw input bytes, if the backend accepts input.
no setteroverride
isRawMode bool
Whether raw mode is currently enabled.
no setteroverride
isTerminal bool
Whether the remote socket should be treated as a locally interrogable terminal surface.
final
resizeStream Stream<TerminalDimensions>?
Stream of terminal resize events, if the backend can emit them.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shutdownStream Stream<void>?
Stream of shutdown/interrupt events, if the backend can emit them.
no setteroverride
size TerminalDimensions
Current terminal dimensions.
no setteroverride
socket Socket
The connected socket.
final
supportsAnsi bool
Whether ANSI/OSC sequences are supported on the remote surface.
final

Methods

disableRawMode() → void
Disables raw input mode.
override
dispose() → void
Disposes backend resources.
override
enableRawMode() RawModeGuard
Enables raw input mode.
override
flush() Future<void>
Flushes any buffered backend output.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optimizeMovements() → ({bool useBackspace, bool useTabs})
Host-specific movement optimization hints.
override
toString() String
A string representation of this object.
inherited
writeRaw(String data) → void
Writes raw terminal data immediately.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited