0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Add the {deflate, boolean()} Websocket command

It allows to temporarily disable Websocket compression
when it was negotiated. It's ignored otherwise. This
can be used as fine-grained control when some frames
do not compress well.
This commit is contained in:
Loïc Hoguin 2018-11-13 15:55:09 +01:00
parent 8164b50453
commit 8d920f3db9
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 98 additions and 24 deletions

View file

@ -1,5 +1,5 @@
%% This module takes commands from the x-commands header
%% and returns them in the websocket_init/1 callback.
%% This module starts with active mode disabled
%% and enables it again once a timeout is triggered.
-module(ws_active_commands_h).
-behavior(cowboy_websocket).