-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support compression #299
Support compression #299
Conversation
It seems we should have a minimum size threshold for http compression, since compressing small data makes them larger. |
When will this make it into the live SocketIO code? Anyway to use it now? |
@nkzawa Why wouldn't we just let the proxy handle this? |
@defunctzombie mainly because we want to turn the compression on/off per message(payload) to emulate the permessage-deflate extension of WebSocket. I think we can't support this with proxy. |
@defunctzombie you can still have your proxy handle this by turning compression off in engine.io right? |
@lpinca updated, thx! |
@@ -212,6 +212,11 @@ to a single process. | |||
to (`['polling', 'websocket']`) | |||
- `allowUpgrades` (`Boolean`): whether to allow transport upgrades | |||
(`true`) | |||
- `perMessageDeflate` (`Object|Boolean`): paramters of the WebSocket permessage-deflate extension | |||
(see [ws module](https://github.com/einaros/ws) api docs). Set to `false` to disable. (`true`) | |||
- `httpCompression` (`Object|Boolean`): paramters of the http compression for the polling transports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
Any ETA when this will be merged. This could be huge!! |
@Leeus I'm working to reflect code review. Maybe this will be merged after that if there is no problem anymore. |
@rauchg fixed and rebased. could you check again? |
When we call Otherwise, it seems that if we disable compression globally, it'll still force to |
Before, it seems that it was always defaulting to |
|
@nkzawa please rebase so I can merge. |
Conflicts: package.json
@rauchg rebased |
Add the permessage-deflate extension support for WebSocket, and http compression for polling. They are enabled by default.
Also you can disable the compression per message through the option of
send
method.Related: socketio/socket.io#1148, #298 #271