diff options
author | Loïc Hoguin <[email protected]> | 2019-05-13 13:18:01 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-05-13 13:18:01 +0200 |
commit | 3aa7168404e62f9ea9e290380b93569eff4372a8 (patch) | |
tree | ab8cb6f89c2e5e3abb5cb27d34b9b902b427625f /src/gun_event.erl | |
parent | cfd702a716f834c431abd46532e8cfa4debd1468 (diff) | |
download | gun-3aa7168404e62f9ea9e290380b93569eff4372a8.tar.gz gun-3aa7168404e62f9ea9e290380b93569eff4372a8.tar.bz2 gun-3aa7168404e62f9ea9e290380b93569eff4372a8.zip |
Add the disconnect event callback
Diffstat (limited to 'src/gun_event.erl')
-rw-r--r-- | src/gun_event.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gun_event.erl b/src/gun_event.erl index fffcafe..bb541ed 100644 --- a/src/gun_event.erl +++ b/src/gun_event.erl @@ -43,6 +43,14 @@ -callback connect_start(connect_event(), State) -> State. -callback connect_end(connect_event(), State) -> State. +%% disconnect. + +-type disconnect_event() :: #{ + reason := normal | closed | {error, any()} +}. + +-callback disconnect(disconnect_event(), State) -> State. + %% @todo domain_lookup_start %% @todo domain_lookup_end %% @todo tls_handshake_start @@ -50,7 +58,6 @@ %% @todo origin_changed %% @todo transport_changed %% @todo protocol_changed -%% @todo disconnected %% @todo terminate %% @todo stream_start %% @todo stream_end |