InMemoryTransport

halotukozak.mrpc.transport.InMemoryTransport
final class InMemoryTransport(server: RawRpc[String]) extends RawRpc[String]

The one in-memory RawRpc[String] instantiation: a thin wrapper over a server-side RawRpc[String] (the materialized server adapter) that routes every fire/call/get across an explicit transport boundary. Because Raw = String (JSON) the invocation is already fully serializable, so the "transport" is in-process — a function call across the hop step rather than an HTTP/WebSocket stack. No new Raw type and no codec are introduced; the leaf encoding stays in halotukozak.mrpc.codec.JsonRawValue.

This adds the explicit raw->transport->raw hop the bare loopback lacks, completing a full real->raw->transport->raw->real round-trip when sandwiched between materializeAsRaw.asRaw and materializeAsReal.asReal.

Crucially, get re-wraps the sub-RPC in a fresh InMemoryTransport, so sub-RPC recursion re-crosses the boundary at every nesting level rather than only at the top call.

Attributes

Source
InMemoryTransport.scala
Graph
Supertypes
trait RawRpc[String]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def call(invocation: RawInvocation[String]): Future[String]

Attributes

Source
InMemoryTransport.scala
def fire(invocation: RawInvocation[String]): Unit

Attributes

Source
InMemoryTransport.scala
def get(invocation: RawInvocation[String]): RawRpc[String]

Attributes

Source
InMemoryTransport.scala