MemoryNetwork
Defined in: collab-transport.ts:361
A loopback collaboration network: one embedded InMemoryAuthority plus any
number of in-process Transports wired to it. Optional latency makes the
optimistic UI observable in examples; with latencyMs: 0 (the default)
delivery is synchronous and fully deterministic, which is what the tests rely
on. Per-endpoint delivery is always FIFO, even under random latency, so the
canonical confirm stream never arrives out of order.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MemoryNetwork(options?): MemoryNetwork;Defined in: collab-transport.ts:368
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options | MemoryNetworkOptions |
Returns
Section titled “Returns”MemoryNetwork
Accessors
Section titled “Accessors”authority
Section titled “authority”Get Signature
Section titled “Get Signature”get authority(): InMemoryAuthority;Defined in: collab-transport.ts:375
The embedded authority — the canonical ordered log and the document it folds to.
Returns
Section titled “Returns”Methods
Section titled “Methods”connect()
Section titled “connect()”connect(): Transport;Defined in: collab-transport.ts:380
Open a new client transport connected to the hub.
Returns
Section titled “Returns”peers()
Section titled “peers()”peers(): string[];Defined in: collab-transport.ts:397
Peer ids currently connected (handshake completed).
Returns
Section titled “Returns”string[]