Skip to content

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.

new MemoryNetwork(options?): MemoryNetwork;

Defined in: collab-transport.ts:368

ParameterType
optionsMemoryNetworkOptions

MemoryNetwork

get authority(): InMemoryAuthority;

Defined in: collab-transport.ts:375

The embedded authority — the canonical ordered log and the document it folds to.

InMemoryAuthority

connect(): Transport;

Defined in: collab-transport.ts:380

Open a new client transport connected to the hub.

Transport


peers(): string[];

Defined in: collab-transport.ts:397

Peer ids currently connected (handshake completed).

string[]