RemoteReplServer
Serves one connection, borrowing its streams and backend.
- Kind:
Class - Namespace: Repl.Remote
- Assembly:
Repl.Remote - Source: src/Repl.Remote/RemoteReplServer.cs
Signature
Section titled “Signature”public static class RemoteReplServerInheritance
Section titled “Inheritance”Methods
Section titled “Methods”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)Parameters
Section titled “Parameters”stream(Stream): The duplex stream to serve.backend(IRemoteReplBackend): The backend that handles requests.onError(Action<Exception>): As for RunAsync(Stream, Stream, IRemoteReplBackend, Action<Exception>, CancellationToken).cancellationToken(CancellationToken): Stops serving.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”stream(Stream)backend(IRemoteReplBackend)cancellationToken(CancellationToken)
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”input(Stream)output(Stream)backend(IRemoteReplBackend)cancellationToken(CancellationToken)