aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-08-26 17:19:29 +0200
committerLoïc Hoguin <[email protected]>2020-09-21 15:51:58 +0200
commit35d9f47fbcff23395c256b7814ce6af1d85129a2 (patch)
tree2bb4864409827488dd0c236d6983160e04937252 /src/gun_http.erl
parent3de0604eec218996dad4db59c0cc96092cd7e0e7 (diff)
downloadgun-35d9f47fbcff23395c256b7814ce6af1d85129a2.tar.gz
gun-35d9f47fbcff23395c256b7814ce6af1d85129a2.tar.bz2
gun-35d9f47fbcff23395c256b7814ce6af1d85129a2.zip
Add a gun:stream_ref() type and fix Dialyzer
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r--src/gun_http.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 2536369..490f025 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -41,10 +41,10 @@
-type io() :: head | {body, non_neg_integer()} | body_close | body_chunked | body_trailer.
%% @todo Make that a record.
--type connect_info() :: {connect, reference(), gun:connect_destination()}.
+-type connect_info() :: {connect, gun:stream_ref(), gun:connect_destination()}.
-record(websocket, {
- ref :: reference(),
+ ref :: gun:stream_ref(),
reply_to :: pid(),
key :: binary(),
extensions :: [binary()],
@@ -52,7 +52,7 @@
}).
-record(stream, {
- ref :: reference() | connect_info() | #websocket{},
+ ref :: gun:stream_ref() | connect_info() | #websocket{},
reply_to :: pid(),
flow :: integer() | infinity,
method :: binary(),
@@ -75,7 +75,7 @@
%% Base stream ref, defined when the protocol runs
%% inside an HTTP/2 CONNECT stream.
- base_stream_ref = undefined :: undefined | reference() | [reference()],
+ base_stream_ref = undefined :: undefined | gun:stream_ref(),
streams = [] :: [#stream{}],
in = head :: io(),