ReplTelnetSession
Runs a REPL session over a Telnet-framed transport. Handles Telnet negotiation (BINARY, SGA, ECHO, NAWS, TERMINAL-TYPE) and delegates to StreamedReplHost for session management.
- Kind:
Class - Namespace: Repl.Telnet
- Assembly:
Repl.Telnet - Source: src/Repl.Telnet/ReplTelnetSession.cs
Signature
Section titled “Signature”public static class ReplTelnetSessionInheritance
Section titled “Inheritance”Methods
Section titled “Methods”RunAsync(ReplApp, IDuplexPipe, ReplRunOptions?, Action<int, int>?, Action<string>?, CancellationToken)
Section titled “RunAsync(ReplApp, IDuplexPipe, ReplRunOptions?, Action<int, int>?, Action<string>?, CancellationToken)”Runs a REPL app session over a Telnet-framed bidirectional pipe and exposes Telnet negotiation metadata callbacks (NAWS and TERMINAL-TYPE).
public static ValueTask<int> RunAsync(ReplApp app, IDuplexPipe pipe, ReplRunOptions? options, Action<int, int>? onWindowSizeChanged, Action<string>? onTerminalTypeChanged, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”app(ReplApp)pipe(IDuplexPipe)options(ReplRunOptions)onWindowSizeChanged(Action<int, int>)onTerminalTypeChanged(Action<string>)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<int>
RunAsync(ReplApp, IDuplexPipe, ReplRunOptions?, CancellationToken)
Section titled “RunAsync(ReplApp, IDuplexPipe, ReplRunOptions?, CancellationToken)”Runs a REPL app session over a Telnet-framed bidirectional pipe. This is the primary overload — all other overloads adapt to IDuplexPipe.
public static ValueTask<int> RunAsync(ReplApp app, IDuplexPipe pipe, ReplRunOptions? options = null, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”app(ReplApp)pipe(IDuplexPipe)options(ReplRunOptions)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<int>
RunAsync(ReplApp, Stream, ReplRunOptions?, Action<int, int>?, Action<string>?, CancellationToken)
Section titled “RunAsync(ReplApp, Stream, ReplRunOptions?, Action<int, int>?, Action<string>?, CancellationToken)”Runs a REPL app session over a Telnet-framed bidirectional stream and exposes Telnet negotiation metadata callbacks (NAWS and TERMINAL-TYPE).
public static ValueTask<int> RunAsync(ReplApp app, Stream stream, ReplRunOptions? options, Action<int, int>? onWindowSizeChanged, Action<string>? onTerminalTypeChanged, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”app(ReplApp)stream(Stream)options(ReplRunOptions)onWindowSizeChanged(Action<int, int>)onTerminalTypeChanged(Action<string>)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<int>
RunAsync(ReplApp, Stream, ReplRunOptions?, CancellationToken)
Section titled “RunAsync(ReplApp, Stream, ReplRunOptions?, CancellationToken)”Runs a REPL app session over a Telnet-framed bidirectional stream (TCP NetworkStream, named pipe, etc.). The stream is adapted to an IDuplexPipe internally.
public static ValueTask<int> RunAsync(ReplApp app, Stream stream, ReplRunOptions? options = null, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”app(ReplApp)stream(Stream)options(ReplRunOptions)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<int>
RunAsync(ReplApp, WebSocket, ReplRunOptions?, Action<int, int>?, Action<string>?, CancellationToken)
Section titled “RunAsync(ReplApp, WebSocket, ReplRunOptions?, Action<int, int>?, Action<string>?, CancellationToken)”Runs a REPL app session over a Telnet-framed WebSocket connection and exposes Telnet negotiation metadata callbacks (NAWS and TERMINAL-TYPE).
public static ValueTask<int> RunAsync(ReplApp app, WebSocket socket, ReplRunOptions? options, Action<int, int>? onWindowSizeChanged, Action<string>? onTerminalTypeChanged, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”app(ReplApp)socket(WebSocket)options(ReplRunOptions)onWindowSizeChanged(Action<int, int>)onTerminalTypeChanged(Action<string>)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<int>
RunAsync(ReplApp, WebSocket, ReplRunOptions?, CancellationToken)
Section titled “RunAsync(ReplApp, WebSocket, ReplRunOptions?, CancellationToken)”Runs a REPL app session over a Telnet-framed WebSocket connection. The WebSocket is adapted to an IDuplexPipe internally.
public static ValueTask<int> RunAsync(ReplApp app, WebSocket socket, ReplRunOptions? options = null, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”app(ReplApp)socket(WebSocket)options(ReplRunOptions)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<int>