Class IpcServer
- Namespace
- Nerdbank.JsonRpc
- Assembly
- Nerdbank.JsonRpc.dll
A same-account IPC listener with explicitly observed connection callbacks.
public sealed class IpcServer : IDisposable, IAsyncDisposable
- Inheritance
-
IpcServer
- Implements
- Inherited Members
Properties
Completion
Gets a task that completes when listening and all accepted callbacks finish.
public Task Completion { get; }
Property Value
Name
Gets the endpoint name to pass to ConnectAsync(string, CancellationToken).
public string Name { get; }
Property Value
Methods
Create(Func<Stream, CancellationToken, Task>, IpcServerOptions)
Starts listening before returning the endpoint.
public static IpcServer Create(Func<Stream, CancellationToken, Task> onConnected, IpcServerOptions options = default)
Parameters
onConnectedFunc<Stream, CancellationToken, Task>A callback that owns the stream until it completes. The stream is then disposed.
optionsIpcServerOptionsListening options.
Returns
- IpcServer
The listening server.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.