aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_http2.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cow_http2.erl')
-rw-r--r--src/cow_http2.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cow_http2.erl b/src/cow_http2.erl
index 460e6f1..efc3ad8 100644
--- a/src/cow_http2.erl
+++ b/src/cow_http2.erl
@@ -31,6 +31,8 @@
-export([ping/1]).
-export([ping_ack/1]).
-export([goaway/3]).
+-export([window_update/1]).
+-export([window_update/2]).
-type streamid() :: pos_integer().
-type fin() :: fin | nofin.
@@ -389,6 +391,12 @@ goaway(LastStreamID, Reason, DebugData) ->
Len = iolist_size(DebugData) + 8,
[<< Len:24, 7:8, 0:41, LastStreamID:31, ErrorCode:32 >>, DebugData].
+window_update(Increment) ->
+ window_update(0, Increment).
+
+window_update(StreamID, Increment) when Increment =< 16#7fffffff ->
+ << 4:24, 8:8, 0:8, StreamID:32, 0:1, Increment:31 >>.
+
flag_fin(nofin) -> 0;
flag_fin(fin) -> 1.