Abh*_*hik 38 events node.js socket.io
有谁知道Socket.io中内置了哪些事件?
例如:,,等.connectiondisconnectjoin
Ole*_*leg 84
以下是我在官方文档中找到的所有内容:
socket.io对象的客户端事件:connect.成功连接后被解雇.connect_error.因连接错误而被解雇.Object 错误对象connect_timeout.在连接超时时触发.reconnect.成功重新连接后被解雇.Number 重新连接尝试次数reconnect_attempt.试图重新连接时被解雇.reconnecting.试图重新连接时被解雇.Number 重新连接尝试次数reconnect_error.在重新连接尝试错误时触发.Object 错误对象reconnect_failed.当无法重新连接时被解雇reconnectionAttemptssocket对象的客户端事件:connect.连接时被解雇.error.在连接错误时触发Object 错误数据disconnect.断开连接后被解雇.reconnect.成功重新连接后被解雇.Number 重新连接尝试次数reconnect_attempt.试图重新连接时被解雇.reconnecting.试图重新连接时被解雇.Number 重新连接尝试次数reconnect_error.在重新连接尝试错误时触发.Object 错误对象reconnect_failed.当无法重新连接时被解雇reconnectionAttemptsconnection/ connect.连接时被解雇.Socket 传入的套接字.对于当前版本(1.3.4)reconnect_attempt,reconnecting
客户端事件是同义词.
| 归档时间: |
|
| 查看次数: |
32056 次 |
| 最近记录: |