Hi,
For an application I am making, I need to reuse the
socket.io instance.
After some digging, I found out it is spawned in cozy-home
(/server/initializers/realtime.coffee). TL;DR: how could we generally
hook up to this
socket.io instance?
More in depth:
- my use case needs the
compound.io variable from realtime.coffee.
- even if an app spawns its own instance of
socket.io, apparently
browsers can't handle several of them (well, at least Firefox can't),
and only the first one, top level
socket.io is reached.
- of course, I could just have my own clone of cozy-home and reuse it,
rebasing modifications atop of mine, but that's something I'd like to avoid.
Could we imagine a system of optional plugins for the realtime adapter?
Or maybe make an americano plugin that adds the hook (I suppose it would
need to make cozy-realtime-adapter an americano plugin itself)?
In this case, I need the
socket.io instance for setting up an easyrtc
server [1].
Any other ideas or feedback will be appreciated :)
Cheers,
Ben
[1]
https://github.com/priologic/easyrtc