MessagePortTransport
此内容尚不支持你的语言。
Defined in: net/MessagePortTransport.ts:24
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.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MessagePortTransport(
port):MessagePortTransport
Defined in: net/MessagePortTransport.ts:31
Parameters
Section titled “Parameters”MessagePortLike | MessagePort
Returns
Section titled “Returns”MessagePortTransport
Properties
Section titled “Properties”delivery
Section titled “delivery”
readonlydelivery:"reliable-ordered"
Defined in: net/MessagePortTransport.ts:26
A MessagePort is a FIFO between two realms on one machine.
Implementation of
Section titled “Implementation of”ReliableOrderedTransport.delivery
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: net/MessagePortTransport.ts:50
Returns
Section titled “Returns”void
on(
event,handler): () =>void
Defined in: net/MessagePortTransport.ts:42
Subscribe to incoming frames. Returns an unsubscribe function.
Parameters
Section titled “Parameters”"message"
handler
Section titled “handler”(data) => void
Returns
Section titled “Returns”() => void
Implementation of
Section titled “Implementation of”send()
Section titled “send()”send(
data):void
Defined in: net/MessagePortTransport.ts:46
Parameters
Section titled “Parameters”string | ArrayBuffer
Returns
Section titled “Returns”void