跳转到内容

createSocket

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

createSocket(options): PlatformSocket

Defined in: net/index.ts:37

Open a socket through the platform adapter (web → WebSocket, wechat → wx.connectSocket, node → ws). A platform without networking fails loud; a bare host with no adapter set (unit tests) falls back to the browser socket.

PlatformSocketOptions

PlatformSocket