Skip to content

Interface ITerminalConnection

A byte stream between the terminal and whatever drives it: a network service, a pty, or an in-process program. Connected, DataReceived, and Closed may fire on any thread; TerminalSession marshals them to the main thread. Closed fires at most once, and never after Dispose.

Declaration
public interface ITerminalConnection
Declaration
bool IsConnected { get; }

Starts connecting and returns at once; Connected or Closed reports the outcome.

Declaration
void Connect()

Queues bytes for the far end. Never blocks on the network.

Declaration
void Send(byte[] data, int offset, int count)
Type Name
System.Byte[] data
System.Int32 offset
System.Int32 count

The terminal grid changed size. Connections that can pass this on do.

Declaration
void NotifyResize(int cols, int rows)
Type Name
System.Int32 cols
System.Int32 rows

The stream is open and data can flow.

Declaration
event Action Connected

System.Action

Declaration
event Action<byte[]> DataReceived

System.Action<System.Byte[]>

Declaration
event Action<CloseReason> Closed

System.Action<DarkEffekt.Terminal.CloseReason>