Skip to content

Commit

Permalink
Improve cow_http2:settings/0 type and export it
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Feb 11, 2025
1 parent 133ac59 commit f74e175
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/cow_http2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,20 @@
-type head_fin() :: head_fin | head_nofin.
-export_type([head_fin/0]).

%% @todo The PRIORITY mechanism in HTTP/2 is de facto deprecated.
-type exclusive() :: exclusive | shared.
-type weight() :: 1..256.
-type settings() :: map().

-type settings() :: #{
enable_connect_protocol => boolean(),
enable_push => boolean(),
header_table_size => 16384..16#7fffffff,
initial_window_size => 0..16#7fffffff,
max_concurrent_streams => 0..16#ffffffff,
max_frame_size => 16384..16777215,
max_header_list_size => 16384..16#ffffffff
}.
-export_type([settings/0]).

-type error() :: no_error
| protocol_error
Expand Down

0 comments on commit f74e175

Please sign in to comment.