NetTransport
此内容尚不支持你的语言。
Defined in: net/NetChannel.ts:13
The minimal socket surface NetChannel drives (GameSocket / WeChatSocket fit).
Methods
Section titled “Methods”on(
event,handler): () =>void
Defined in: net/NetChannel.ts:16
Subscribe to incoming frames. Returns an unsubscribe function.
Parameters
Section titled “Parameters”"message"
handler
Section titled “handler”(data) => void
Returns
Section titled “Returns”() => void
send()
Section titled “send()”send(
data):void
Defined in: net/NetChannel.ts:14
Parameters
Section titled “Parameters”string | ArrayBuffer
Returns
Section titled “Returns”void