Skip to content

MemoryTransport

Defined in: net/MemoryTransport.ts:20

A transport that delivers every frame, once, in send order. NetChannel needs no such promise; replication does — its client applies the inbox in ARRIVAL order because that IS the authority’s order. Declaring the marker is a claim about the link, not a feature to switch on.

new MemoryTransport(options?): MemoryTransport

Defined in: net/MemoryTransport.ts:30

MemoryTransportOptions = {}

MemoryTransport

readonly delivery: "reliable-ordered"

Defined in: net/MemoryTransport.ts:23

In-process: flush delivers the queue in send order, so it models the real thing rather than being merely convenient.

ReliableOrderedTransport.delivery

get pendingCount(): number

Defined in: net/MemoryTransport.ts:35

Frames sent but not yet delivered (manualFlush mode).

number

dropPending(): void

Defined in: net/MemoryTransport.ts:64

Drop queued frames without delivering (packet loss simulation).

void


flush(limit?): void

Defined in: net/MemoryTransport.ts:53

Deliver up to limit queued frames to the peer, in send order.

number = Infinity

void


on(event, handler): () => void

Defined in: net/MemoryTransport.ts:39

Subscribe to incoming frames. Returns an unsubscribe function.

"message"

(data) => void

() => void

ReliableOrderedTransport.on


send(data): void

Defined in: net/MemoryTransport.ts:43

string | ArrayBuffer

void

ReliableOrderedTransport.send


static pair(options?): [MemoryTransport, MemoryTransport]

Defined in: net/MemoryTransport.ts:68

MemoryTransportOptions = {}

[MemoryTransport, MemoryTransport]