aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cow_http2.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cow_http2.erl b/src/cow_http2.erl
index 555dfc2..4b4600f 100644
--- a/src/cow_http2.erl
+++ b/src/cow_http2.erl
@@ -29,6 +29,7 @@
-export([push_promise/3]).
-export([ping/1]).
-export([ping_ack/1]).
+-export([goaway/3]).
-type streamid() :: pos_integer().
-type fin() :: fin | nofin.
@@ -356,6 +357,11 @@ ping(Opaque) ->
ping_ack(Opaque) ->
<< 8:24, 6:8, 0:7, 1:1, 0:32, Opaque:64 >>.
+goaway(LastStreamID, Reason, DebugData) ->
+ ErrorCode = error_code(Reason),
+ Len = iolist_size(DebugData) + 8,
+ [<< Len:24, 7:8, 0:41, LastStreamID:31, ErrorCode:32 >>, DebugData].
+
flag_fin(nofin) -> 0;
flag_fin(fin) -> 1.