# wx.onSocketOpen(function callback)

with Promise style call: Not supported

Mini Program plugin: Not supported

to monitor WebSocket Connect to open events.Recommended use SocketTask The way to manage webSocket Link, the life cycle of each link is more controllable. There are multiple simultaneous webSocket In the case of links to wx Prefixes may bring up some of the situations that are not expected.

# parameter

# function callback

WebSocket Connect callback functions for open events

# parameter

# Object res
attribute type Introductions Minimum version
header object Successfully connected HTTP response Header 2.0.0