ProgramHost.socket constructor

ProgramHost.socket(
  1. Socket socket, {
  2. TerminalDimensions initialSize = (width: 80, height: 24),
  3. bool supportsAnsi = true,
  4. ColorProfile colorProfile = ColorProfile.trueColor,
  5. bool closeSocketOnDispose = true,
})

Creates a socket-backed host for remote or shell-mode terminals.

Implementation

factory ProgramHost.socket(
  io.Socket socket, {
  TerminalDimensions initialSize = const (width: 80, height: 24),
  bool supportsAnsi = true,
  ColorProfile colorProfile = ColorProfile.trueColor,
  bool closeSocketOnDispose = true,
}) => _BackendProgramHost(
  SocketTerminalBackend(
    socket,
    initialSize: initialSize,
    supportsAnsi: supportsAnsi,
    colorProfile: colorProfile,
    closeSocketOnDispose: closeSocketOnDispose,
  ),
);