aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.h
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2019-07-14 23:48:36 +0200
committerDave Wallace <dwallacelf@gmail.com>2019-07-23 18:29:10 +0000
commitb725ebb3f47302c416e41c7be3f5a8bb3c9fe547 (patch)
treef3e622e623a7032f1b4e017750bbe79bb233b226 /src/plugins/quic/quic.h
parent6b257c64c4b44c7f9546f18645635b32e6f8b0d3 (diff)
quic: Refactor connections closing and deletion
This code should handle the 3 following cases: - Active close quic_proto_on_close sets state to ACTIVE_CLOSING send packets eventually returns an error, calling quic_connection_closed which deletes the connection - Passive close quic_on_closed_by_peer -> set state to PASSIVE_CLOSING "race" between app confirmation (calling quic_proto_on_close) and quicly signalling that it's done (triggers call to quic_connection_closed). If quic_connection_closed is called first, it sets the state to PASSIVE CLOSING QUIC CLOSED, then when quic_proto_on_close is called it frees the connection. If quic_proto_on_close is called first, it sets the state to PASSIVE CLOSING APP CLOSED, then when quic_connection_closed is called it frees the connection - Error close (reset) quic_connection_closed is called in state READY. This means a timeout or protocol error happened. This calls session_transport_reset_notify, the app should confirm the deletion and quic_proto_on_close will be called to delete the connection. Change-Id: I3acbf9b079ed2439bdbb447197c428c78915d8c0 Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Type: feature
Diffstat (limited to 'src/plugins/quic/quic.h')
-rw-r--r--src/plugins/quic/quic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/quic/quic.h b/src/plugins/quic/quic.h
index 80f2664a6ec..de27f2ac7d5 100644
--- a/src/plugins/quic/quic.h
+++ b/src/plugins/quic/quic.h
@@ -71,6 +71,9 @@ typedef enum quic_ctx_conn_state_
QUIC_CONN_STATE_HANDSHAKE,
QUIC_CONN_STATE_READY,
QUIC_CONN_STATE_PASSIVE_CLOSING,
+ QUIC_CONN_STATE_PASSIVE_CLOSING_APP_CLOSED,
+ QUIC_CONN_STATE_PASSIVE_CLOSING_QUIC_CLOSED,
+ QUIC_CONN_STATE_ACTIVE_CLOSING,
} quic_ctx_conn_state_t;