Skip to content

Commit f74e175

Browse files
committed
Improve cow_http2:settings/0 type and export it
1 parent 133ac59 commit f74e175

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/cow_http2.erl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,20 @@
4242
-type head_fin() :: head_fin | head_nofin.
4343
-export_type([head_fin/0]).
4444

45+
%% @todo The PRIORITY mechanism in HTTP/2 is de facto deprecated.
4546
-type exclusive() :: exclusive | shared.
4647
-type weight() :: 1..256.
47-
-type settings() :: map().
48+
49+
-type settings() :: #{
50+
enable_connect_protocol => boolean(),
51+
enable_push => boolean(),
52+
header_table_size => 16384..16#7fffffff,
53+
initial_window_size => 0..16#7fffffff,
54+
max_concurrent_streams => 0..16#ffffffff,
55+
max_frame_size => 16384..16777215,
56+
max_header_list_size => 16384..16#ffffffff
57+
}.
58+
-export_type([settings/0]).
4859

4960
-type error() :: no_error
5061
| protocol_error

0 commit comments

Comments
 (0)