aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_event.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-05-13 14:04:34 +0200
committerLoïc Hoguin <[email protected]>2019-05-13 14:04:34 +0200
commita309f196d15d3045d2e70b2d7e23858f47adb7df (patch)
tree6af8caa19dbccd790b4eefed298a924f682e4322 /src/gun_event.erl
parent3aa7168404e62f9ea9e290380b93569eff4372a8 (diff)
downloadgun-a309f196d15d3045d2e70b2d7e23858f47adb7df.tar.gz
gun-a309f196d15d3045d2e70b2d7e23858f47adb7df.tar.bz2
gun-a309f196d15d3045d2e70b2d7e23858f47adb7df.zip
Add the terminate event
Diffstat (limited to 'src/gun_event.erl')
-rw-r--r--src/gun_event.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gun_event.erl b/src/gun_event.erl
index bb541ed..3d83bea 100644
--- a/src/gun_event.erl
+++ b/src/gun_event.erl
@@ -51,6 +51,15 @@
-callback disconnect(disconnect_event(), State) -> State.
+%% terminate.
+
+-type terminate_event() :: #{
+ state := not_connected | connected,
+ reason := normal | shutdown | {shutdown, any()} | any()
+}.
+
+-callback terminate(terminate_event(), State) -> State.
+
%% @todo domain_lookup_start
%% @todo domain_lookup_end
%% @todo tls_handshake_start
@@ -58,7 +67,6 @@
%% @todo origin_changed
%% @todo transport_changed
%% @todo protocol_changed
-%% @todo terminate
%% @todo stream_start
%% @todo stream_end
%% @todo request_start