这是我在官方文档中找到的所有内容:
[socket.io
对象的客户端事件:](http://socket.io/docs/client-
api/#manager(url:string,-opts:object))
connect
。连接成功后触发。connect_error
。连接错误时触发。
参数:Object
错误对象
connect_timeout
。在连接超时时触发。reconnect
。重新连接成功后触发。
参数:Number
重新连接尝试次数
reconnect_attempt
。尝试重新连接时触发。reconnecting
。尝试重新连接时触发。
参数:Number
重新连接尝试次数
reconnect_error
。重新连接尝试错误时触发。
参数:Object
错误对象
reconnect_failed
。无法在内部重新连接时触发reconnectionAttempts
socket
对象的客户端事件:
connect
。在连接时触发。error
。在出现连接错误时触发
参数:Object
错误数据disconnect
。断开连接时触发。reconnect
。重新连接成功后触发。
参数:Number
重新连接尝试次数reconnect_attempt
。尝试重新连接时触发。reconnecting
。尝试重新连接时触发。
参数:Number
重新连接尝试次数reconnect_error
。重新连接尝试错误时触发。
参数:Object
错误对象reconnect_failed
。无法在内部重新连接时触发reconnectionAttempts
服务器端事件:
connection
/connect
。在连接上触发。
参数:Socket
传入的套接字。
编辑:
对于当前版本(
1.3.4),
reconnect_attempt和
reconnecting客户端事件是同义词。



