ProgramHost.webSocket constructor
ProgramHost.webSocket(
- WebSocket socket, {
- TerminalDimensions initialSize = (width: 80, height: 24),
- bool supportsAnsi = true,
- bool isTerminal = true,
- ColorProfile colorProfile = ColorProfile.trueColor,
- ({bool useBackspace, bool useTabs}) movementCaps = (useTabs: false, useBackspace: true),
- bool closeSocketOnDispose = true,
Creates a websocket-backed host using the JSON bridge protocol.
Implementation
factory ProgramHost.webSocket(
io.WebSocket socket, {
TerminalDimensions initialSize = const (width: 80, height: 24),
bool supportsAnsi = true,
bool isTerminal = true,
ColorProfile colorProfile = ColorProfile.trueColor,
({bool useTabs, bool useBackspace}) movementCaps = const (
useTabs: false,
useBackspace: true,
),
bool closeSocketOnDispose = true,
}) => _BackendProgramHost(
WebSocketTerminalBackend(
socket,
initialSize: initialSize,
supportsAnsi: supportsAnsi,
isTerminal: isTerminal,
colorProfile: colorProfile,
movementCaps: movementCaps,
closeSocketOnDispose: closeSocketOnDispose,
),
);