aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_event.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-09-22 15:04:37 +0200
committerLoïc Hoguin <[email protected]>2019-09-22 16:46:45 +0200
commit37b771210f94b9b692d0417d79483b9927d46ba2 (patch)
tree9081a202c1323028f15828a0520e53b6a2074d5e /src/gun_event.erl
parent0a5879ceffa3a96666ed8406c1557759811d8a16 (diff)
downloadgun-37b771210f94b9b692d0417d79483b9927d46ba2.tar.gz
gun-37b771210f94b9b692d0417d79483b9927d46ba2.tar.bz2
gun-37b771210f94b9b692d0417d79483b9927d46ba2.zip
Document Socks support
Also correct various Socks related types. This commit also adds a new gun:protocols/0 type as a simpler way of describing preferred protocols. The protocol/opts tuple is also documented. This commit also fixes an issue with the default value for the preferred protocols when using CONNECT over TLS. It was mistakenly not enabling http2 by default.
Diffstat (limited to 'src/gun_event.erl')
-rw-r--r--src/gun_event.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gun_event.erl b/src/gun_event.erl
index a984796..0c1326d 100644
--- a/src/gun_event.erl
+++ b/src/gun_event.erl
@@ -47,7 +47,7 @@
lookup_info := gun_tcp:lookup_info(),
timeout := timeout(),
socket => inet:socket(),
- protocol => http | http2, %% Only when transport is tcp.
+ protocol => http | http2 | socks, %% Only when transport is tcp.
error => any()
}.
@@ -67,7 +67,7 @@
socket := inet:socket() | ssl:sslsocket() | pid(), %% The socket before/after will be different.
tls_opts := [ssl:tls_client_option()],
timeout := timeout(),
- protocol => http | http2,
+ protocol => http | http2 | socks,
error => any()
}.
@@ -241,7 +241,7 @@
%% support CONNECT and Websocket over HTTP/2.
-type protocol_changed_event() :: #{
- protocol := http2 | ws
+ protocol := http | http2 | socks | ws
}.
-callback protocol_changed(protocol_changed_event(), State) -> State.