BaseSubserviceTransformer
Shared abstract base for transformers whose wire representation is a sub-service reference (a channel id registered on the host, resolved to a client stub on the peer). The base holds the register / lookup machinery operating on the service-facing type T; concrete subclasses adapt a (possibly different) user-facing type O to T via toService / fromService.
Introspection consumers pattern-match on this base class to recover the underlying sub-service name regardless of the user-facing adapter shape — e.g. SubserviceTransformer<T> (trivial O == T) and com.monkopedia.ksrpc.flow.FlowSubserviceTransformer<T> (adapts Flow<T> onto KsFlowService<T>) both surface via the same branch.
Inheritors
Properties
Functions
Server-side boundary hook (issue #133). Invoked by RpcMethod.call with the value returned by the handler. The default implementation simply delegates to transform; transformers that need to observe the failure channel (e.g. ResultTransformer for Result<O> return types) override this to fold a returned failure into the wire-level error frame via encodeError.
Client-side boundary hook (issue #133). Invoked by RpcMethod.callChannel with the raw wire response (which may be a CallData.Error). The default implementation throws the decoded error — preserving today's behaviour — and otherwise delegates to untransform. ResultTransformer overrides this to wrap the outcome in a kotlin.Result instead of throwing.