Skip to content

ReplWebSocketSession

Runs a REPL session over a raw WebSocket connection.

public static class ReplWebSocketSession

RunAsync(ReplApp, WebSocket, ReplRunOptions?, Action<TerminalControlMessage>?, CancellationToken)

Section titled “RunAsync(ReplApp, WebSocket, ReplRunOptions?, Action<TerminalControlMessage>?, CancellationToken)”

Runs a REPL app session over a WebSocket-backed host using explicit run options and receives parsed terminal control messages as they arrive.

public static ValueTask<int> RunAsync(ReplApp app, WebSocket socket, ReplRunOptions? options, Action<TerminalControlMessage>? onControlMessage, CancellationToken cancellationToken = default)
  • app (ReplApp): Configured REPL app instance.
  • socket (WebSocket): Connected WebSocket.
  • options (ReplRunOptions): Run options.
  • onControlMessage (Action<TerminalControlMessage>): Optional observer for parsed terminal control messages.
  • cancellationToken (CancellationToken): Cancellation token.

ValueTask<int> - Execution exit code.

RunAsync(ReplApp, WebSocket, ReplRunOptions?, CancellationToken)

Section titled “RunAsync(ReplApp, WebSocket, ReplRunOptions?, CancellationToken)”

Runs a REPL app session over a WebSocket-backed host using explicit run options.

public static ValueTask<int> RunAsync(ReplApp app, WebSocket socket, ReplRunOptions? options, CancellationToken cancellationToken = default)

ValueTask<int> - Execution exit code.

RunAsync(ReplApp, WebSocket, CancellationToken)

Section titled “RunAsync(ReplApp, WebSocket, CancellationToken)”

Runs a REPL app session over a WebSocket-backed host.

public static ValueTask<int> RunAsync(ReplApp app, WebSocket socket, CancellationToken cancellationToken = default)

ValueTask<int> - Execution exit code.

RunWithServicesAsync(ReplApp, WebSocket, IServiceProvider, ReplRunOptions?, Action<TerminalControlMessage>?, CancellationToken)

Section titled “RunWithServicesAsync(ReplApp, WebSocket, IServiceProvider, ReplRunOptions?, Action<TerminalControlMessage>?, CancellationToken)”

Runs a WebSocket session using services borrowed from the embedding host.

public static ValueTask<int> RunWithServicesAsync(ReplApp app, WebSocket socket, IServiceProvider services, ReplRunOptions? options = null, Action<TerminalControlMessage>? onControlMessage = null, CancellationToken cancellationToken = default)
  • app (ReplApp): Configured REPL application.
  • socket (WebSocket): Connected WebSocket.
  • services (IServiceProvider): Host-owned provider; session scopes follow the run options.
  • options (ReplRunOptions): Optional run options.
  • onControlMessage (Action<TerminalControlMessage>): Optional terminal metadata observer.
  • cancellationToken (CancellationToken): Session cancellation.

ValueTask<int> - Session exit code.