diff options
Diffstat (limited to 'src/gun_ws.erl')
-rw-r--r-- | src/gun_ws.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gun_ws.erl b/src/gun_ws.erl index 9e35fa6..66d0fa2 100644 --- a/src/gun_ws.erl +++ b/src/gun_ws.erl @@ -14,6 +14,7 @@ -module(gun_ws). +-export([check_options/1]). -export([name/0]). -export([init/5]). -export([handle/2]). @@ -42,6 +43,16 @@ extensions = #{} :: cow_ws:extensions() }). +check_options(Opts) -> + do_check_options(maps:to_list(Opts)). + +do_check_options([]) -> + ok; +do_check_options([{compress, B}|Opts]) when B =:= true; B =:= false -> + do_check_options(Opts); +do_check_options([Opt|_]) -> + {error, {options, {spdy, Opt}}}. + name() -> ws. %% @todo Protocols |