Skip to content

RemoteReplServer

Serves one connection, borrowing its streams and backend.

public static class RemoteReplServer

RunAsync(Stream, IRemoteReplBackend, Action<Exception>?, CancellationToken)

Section titled “RunAsync(Stream, IRemoteReplBackend, Action<Exception>?, CancellationToken)”

Serves a duplex stream until disconnection or cancellation, reporting failures the client sees only as a sanitized error.

public static Task RunAsync(Stream stream, IRemoteReplBackend backend, Action<Exception>? onError, CancellationToken cancellationToken = default)

Task

RunAsync(Stream, IRemoteReplBackend, CancellationToken)

Section titled “RunAsync(Stream, IRemoteReplBackend, CancellationToken)”

Serves a duplex stream until disconnection or cancellation.

public static Task RunAsync(Stream stream, IRemoteReplBackend backend, CancellationToken cancellationToken = default)

Task

RunAsync(Stream, Stream, IRemoteReplBackend, Action<Exception>?, CancellationToken)

Section titled “RunAsync(Stream, Stream, IRemoteReplBackend, Action<Exception>?, CancellationToken)”

Serves separate input/output streams, reporting failures the client sees only as a sanitized error.

public static Task RunAsync(Stream input, Stream output, IRemoteReplBackend backend, Action<Exception>? onError, CancellationToken cancellationToken = default)
  • input (Stream): The stream requests are read from.
  • output (Stream): The stream responses and notifications are written to.
  • backend (IRemoteReplBackend): The backend that handles requests.
  • onError (Action<Exception>): Receives the detail of each failure the client sees only as a sanitized error. It runs on the failing path, so it should only record the error; an exception it throws is traced and otherwise ignored.
  • cancellationToken (CancellationToken): Stops serving.

Task

RunAsync(Stream, Stream, IRemoteReplBackend, CancellationToken)

Section titled “RunAsync(Stream, Stream, IRemoteReplBackend, CancellationToken)”

Serves separate input/output streams, for example redirected standard I/O.

public static Task RunAsync(Stream input, Stream output, IRemoteReplBackend backend, CancellationToken cancellationToken = default)

Task