Public 属性

 RECONNECTING = 'reconnecting'
 
 RECONNECTED = 'reconnected'
 
 CLOSED = 'closed'
 
 DISCONNECTED = 'disconnected'
 
 RECONNECT_TIMES_EXCEED_ERROR = 'reconnectTimesExceedError'
 
 RECONNECT_ERROR = 'reconnectError'
 
 ERROR = 'error'
 

类成员变量说明

◆ CLOSED

SocketEvent::CLOSED = 'closed'

当socket连接被关闭时, 会触发该事件

◆ DISCONNECTED

SocketEvent::DISCONNECTED = 'disconnected'

当socket意外连接断开时, 会触发该事件

◆ ERROR

SocketEvent::ERROR = 'error'

其他错误

◆ RECONNECT_ERROR

SocketEvent::RECONNECT_ERROR = 'reconnectError'

重连失败

◆ RECONNECT_TIMES_EXCEED_ERROR

SocketEvent::RECONNECT_TIMES_EXCEED_ERROR = 'reconnectTimesExceedError'

当socket自动重连了指定次数仍未连接上时, 会触发该错误

◆ RECONNECTED

SocketEvent::RECONNECTED = 'reconnected'

当socket连接断开后, 重新连接成功后, 会触发该事件

◆ RECONNECTING

SocketEvent::RECONNECTING = 'reconnecting'

当socket断开连接时, 会触发该重连事件

最后更新时间: 2023/10/30 15:57:24