加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cometd: dojo channel ""/cometd/meta"

发布时间:2020-12-16 21:53:40 所属栏目:百科 来源:网络整理
导读:"/cometd/meta" I didn't have time to test it,but here's a code snippet that I *think* should work: function listenerFunc(event) { if (event.action == "disconnect") { // do something } } dojo.subscribe("/cometd/meta",dojo.hitch(listenerFunc

"/cometd/meta"

I didn't have time to test it,but here's a code snippet that I *think*
should work:

function listenerFunc(event)
{
if (event.action == "disconnect")
{
// do something
}

}

dojo.subscribe("/cometd/meta",dojo.hitch(listenerFunc));

The idea is that you can subscribe to /cometd/meta. I use it to detect
reconnects,handshakes,etc. Take a look at the Cometd Chat demo.

-Geoffrey Lee

On Feb 8,2008 4:58 PM,mgorkani <mgork...@gmail.com> wrote:

> In cometd 6.1.6 it was possible to subscribe to /meta/disconnect
> channel. With 6.1.7 this doesn't seem to be supported. Any other way
> to be notified that a client has been disconnect without overwriting
> something in the actual cometd code?

- 隐藏被引用文字 -

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读