From: Kyle Nekritz Date: Wed, 27 Sep 2017 20:11:31 +0000 (-0700) Subject: Add AsyncSocketExceptionType for early data rejection. X-Git-Tag: v2017.10.02.00~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=79869083465aabfcb9d9abd7f31ecfe812e3464b;p=folly.git Add AsyncSocketExceptionType for early data rejection. Summary: To be used to signal that data that was sent as TLS 1.3 early data was lost. This needs its own exception type as it requires special handling (ie it should usually be retried immediately). Reviewed By: siyengar Differential Revision: D5869914 fbshipit-source-id: ca0d8ef19cb991e9d6ffe0f8c99abfb03b748ce6 --- diff --git a/folly/io/async/AsyncSocketException.h b/folly/io/async/AsyncSocketException.h index 7732b562..19aecd2f 100644 --- a/folly/io/async/AsyncSocketException.h +++ b/folly/io/async/AsyncSocketException.h @@ -40,7 +40,8 @@ class AsyncSocketException : public std::runtime_error { SSL_ERROR = 12, COULD_NOT_BIND = 13, SASL_HANDSHAKE_TIMEOUT = 14, - NETWORK_ERROR = 15 + NETWORK_ERROR = 15, + EARLY_DATA_REJECTED = 16, }; AsyncSocketException(AsyncSocketExceptionType type, @@ -100,6 +101,8 @@ class AsyncSocketException : public std::runtime_error { return "SASL handshake timeout"; case NETWORK_ERROR: return "Network error"; + case EARLY_DATA_REJECTED: + return "Early data rejected"; default: return "(Invalid exception type)"; }