# wx.onSocketError(function callback)
with Promise style call: Not supported
Mini Program plugin: Not supported
to monitor WebSocket Error event.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 Callback function for error events
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
errMsg | string | Error message |