aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_event.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun_event.erl')
-rw-r--r--src/gun_event.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gun_event.erl b/src/gun_event.erl
index c87af58..ed50fd7 100644
--- a/src/gun_event.erl
+++ b/src/gun_event.erl
@@ -55,8 +55,20 @@
-callback connect_end(connect_event(), State) -> State.
%% tls_handshake_start/tls_handshake_end.
+%%
+%% These events occur when connecting to a TLS server or when
+%% upgrading the connection to use TLS, for example using CONNECT.
+%% The stream_ref/reply_to values are only present when the TLS
+%% handshake occurs as a result of a request.
+%%
+%% @todo The current implementation of TLS over TLS will not result
+%% in an event being triggered when the TLS handshake fails. Instead
+%% the Gun process will exit because of the link to the gun_tls_proxy
+%% process.
-type tls_handshake_event() :: #{
+ stream_ref => reference(),
+ reply_to => pid(),
socket := inet:socket() | ssl:sslsocket(), %% The socket before/after will be different.
tls_opts := [ssl:connect_option()],
timeout := timeout(),