本文介绍了在meteor中,我如何获得底层sockjs服务器的句柄?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想访问meteor利用的sockjs api进行实时更新。 Meteor发出类似 http:// localhost:3000 / sockjs / 348 / zfjta7hy / xhr 的内容,我想利用sockjs api来规避pub / sub流星的东西有这样的东西:

I'd like to access the sockjs api that meteor leverages to do its real-time updating. Meteor emits something like http://localhost:3000/sockjs/348/zfjta7hy/xhr and I'd like to leverage the sockjs api in order to circumvent the pub/sub stuff in meteor with something like this:

var sock = new SockJS('http://localhost:3000/sockjs/dynamically_created_by_meteor');

然后只需使用 sock 来做一些超出流星实时更新范围的协同工作。我还没有充分挖掘代码,但是我想知道是否有人知道如何在流星中获得sockjs url句柄?谢谢你的帮助!

And then simply use sock to do some collaborative work that's outside the scope of meteor's real-time updating. I haven't dug through the code enough yet to see this, but am wondering if anyone has an idea on how I can get a sockjs url handle in meteor? Thanks for your help!

推荐答案

我在这里回答了一个类似的问题,解决方案并不完美,但它确实有效:

I answered a similar question here, the solution isn't perfect but it works: Publish arbitrary data and automatically update HTML

这篇关于在meteor中,我如何获得底层sockjs服务器的句柄?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 09:21