var heartbeat, ws = new WebSocket(url); ws.onopen = function(e){ heartbeat = setInterval(function(){ ws.send({type:'heartbeat'}); },3e4); plugin.emit('live.onopen', e, heartbeat); }, ...
剛剛在論壇里搜了一圈,也有前輩提的這個問題答案說是不支持。不知道現(xiàn)在還支不支持了呢? 現(xiàn)在做的程序是個web聊天的,一個服務(wù)器上有多個網(wǎng)站,想每個網(wǎng)站都有獨立的聊天室?,F(xiàn)在能不能實現(xiàn)一個端口服務(wù)多個網(wǎng)站,可以的話是用路由實現(xiàn)嗎? 如果還不支持的話,是不是是得在Applications文件夾下建立多個app呢?...
環(huán)境是用的gateway和client,當客戶端下線后,雖然gateway知道了,但是網(wǎng)站不知道,客戶端也不知道,是不是應(yīng)該在gateway上OnClose發(fā)送一個http請求到網(wǎng)站,然后網(wǎng)站再用client去推送離線通知?有沒有更好的方法呢?...