Namespace DotBoxD.Services.Server
Classes
- InstanceRegistry
Default IInstanceRegistry. Backed by a single ConcurrentDictionary<TKey, TValue> keyed on
(serviceName, instanceId). One registry per connection.
- RpcHost
Accepts connections from a listener and turns each one into an RpcPeer. The accept loop that used to live inside the server now lives here, and its output is peers: because each connection is a full peer, a host can both provide services to and call back into the peers that connect to it.
Interfaces
- IInstanceRegistry
Per-connection registry that holds server-side sub-service instances by opaque instance identifier. Created by the server when a connection is accepted and drained when the connection closes — instances therefore have connection-scoped lifetime and cannot leak across tenants.
- INonStreamingServiceDispatcher
Marker for dispatchers whose methods cannot consume streamed arguments or produce streamed responses. The peer can use this to skip allocating a streaming context for ordinary RPC calls.
- IRpcInvoker
The call surface a generated proxy uses to invoke methods the other side provides. Implemented by RpcPeer. This is the transport-agnostic invoke contract with no notion of "client" or "connect" — a peer simply forwards calls.
- IServiceDispatcher
Interface for generated service dispatchers that route incoming requests to the appropriate service method. Root-service dispatchers use
DispatchAsync; sub-service dispatchers also implementDispatchOnInstanceAsyncto route calls to a particular registered instance.