From 5acf7b9277cbead28d6a3e5042aed8b7de109e35 Mon Sep 17 00:00:00 2001 From: Kyle Nekritz Date: Thu, 14 Dec 2017 11:32:57 -0800 Subject: [PATCH] Move security protocol and application protocol APIs to AsyncTransport. Summary: They belong here rather than AsyncTransportWrapper. Reviewed By: siyengar Differential Revision: D6568209 fbshipit-source-id: 0856dba0b2d527ae68d33942b28e2c485a5b1f46 --- folly/io/async/AsyncTransport.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/folly/io/async/AsyncTransport.h b/folly/io/async/AsyncTransport.h index c42888da..2a070a97 100644 --- a/folly/io/async/AsyncTransport.h +++ b/folly/io/async/AsyncTransport.h @@ -390,6 +390,22 @@ class AsyncTransport : public DelayedDestruction, public AsyncSocketBase { return nullptr; } + /** + * Return the application protocol being used by the underlying transport + * protocol. This is useful for transports which are used to tunnel other + * protocols. + */ + virtual std::string getApplicationProtocol() noexcept { + return ""; + } + + /** + * Returns the name of the security protocol being used. + */ + virtual std::string getSecurityProtocol() const { + return ""; + } + /** * @return True iff end of record tracking is enabled */ @@ -682,20 +698,6 @@ class AsyncTransportWrapper : virtual public AsyncTransport, return const_cast(static_cast(this) ->getUnderlyingTransport()); } - - /** - * Return the application protocol being used by the underlying transport - * protocol. This is useful for transports which are used to tunnel other - * protocols. - */ - virtual std::string getApplicationProtocol() noexcept { - return ""; - } - - /** - * Returns the name of the security protocol being used. - */ - virtual std::string getSecurityProtocol() const { return ""; } }; } // namespace folly -- 2.34.1