Parse platform 在解析服务器上检测连接了LiveQuery的客户端
如何检测客户端何时通过liveQuery连接到解析服务器。 我想按服务器更新MongoDB中有关客户端断开连接事件的一些数据。 服务器上的日志显示,但如何在检测到此事件后调用某些函数 我使用的是自托管解析服务器。 提前感谢给你: Parse.Cloud.onLiveQueryEvent( ({event, clients, subscriptions, error}) => { if (event !== 'ws_disconnect') { return; } // Do your magic }); Parse.Cloud.onLiveQueryEvent(({event,clients,subscriptions,error})=>{ 如果(事件!='ws\u disconnect'){ 返回; } //施展你的魔法 }); 如果您想知道,以下是当前发出的事件:Parse platform 在解析服务器上检测连接了LiveQuery的客户端,parse-platform,Parse Platform,如何检测客户端何时通过liveQuery连接到解析服务器。 我想按服务器更新MongoDB中有关客户端断开连接事件的一些数据。 服务器上的日志显示,但如何在检测到此事件后调用某些函数 我使用的是自托管解析服务器。 提前感谢给你: Parse.Cloud.onLiveQueryEvent( ({event, clients, subscriptions, error}) => { if (event !== 'ws_disconnect') { return; } // Do
- 连接
- 订阅
- 退订
- ws_connect
- 断开连接
- ws_断开连接错误