mirror of
https://github.com/NarrativeScience-old/log.io.git
synced 2026-04-25 17:15:52 +03:00
[GH-ISSUE #80] Forcing socket.io to use xhr-streaming #61
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/log.io-NarrativeScience-old#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jochenonline on GitHub (Jun 11, 2013).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/80
Is there a way to force
socket.ionot to usewebsockets, butxhr-streaming? Ourloadbalancerdoes not letwebsocketconnections through, so I would like to switch the communication protocol toxhr-streaming.@wescleveland commented on GitHub (Jun 11, 2013):
shooting from the hip here, haven't tested this idea:
in https://github.com/NarrativeScience/Log.io/blob/master/src/server.coffee, around line 202, socket io is being set up (io.set 'log level', 1 is one of those lines). You could try adding
which should prevent socketio from using websockets. The default transports socket.io uses are websocket, htmlfile, xhr-polling, and jsonp-polling. This might already be something you can set in log.io's configs, I'll defer to @msmathers if this is even a good idea.
You can also check out https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO#recommended-production-settings
and
https://devcenter.heroku.com/articles/using-socket-io-with-node-js-on-heroku
@jochenonline commented on GitHub (Jun 12, 2013):
Yes. I changed it directly in my production version in
lib/server.jsinline 385. So the code there now looks like this:Seems to work. And yes, should be part of the
web_server.conf.@msmathers: Will there be any improvement at all at the moment. I think the thing people are wating on the most is the reactivation of the log history...