跳转到内容

WeChatSocket

此内容尚不支持你的语言。

Defined in: net/WeChatSocket.ts:15

The platform-neutral socket surface (GameSocket / WeChatSocket / a Node ws wrapper all fit): multicast on(event, fn) → unsubscribe, queues sends until open, moves string|ArrayBuffer frames.

new WeChatSocket(options): WeChatSocket

Defined in: net/WeChatSocket.ts:16

PlatformSocketOptions

WeChatSocket

MiniGameSocket.constructor

readyState: PlatformSocketReadyState = 'closed'

Defined in: net/MiniGameSocket.ts:26

MiniGameSocket.readyState

close(code?, reason?): void

Defined in: net/MiniGameSocket.ts:89

number

string

void

MiniGameSocket.close


connect(): void

Defined in: net/MiniGameSocket.ts:41

void

MiniGameSocket.connect


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

Defined in: net/MiniGameSocket.ts:34

K extends keyof PlatformSocketEvents

K

(…args) => void

() => void

MiniGameSocket.on


send(data): void

Defined in: net/MiniGameSocket.ts:81

string | ArrayBuffer

void

MiniGameSocket.send