Move security protocol and application protocol APIs to AsyncTransport.
authorKyle Nekritz <knekritz@fb.com>
Thu, 14 Dec 2017 19:32:57 +0000 (11:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 14 Dec 2017 19:36:04 +0000 (11:36 -0800)
Summary: They belong here rather than AsyncTransportWrapper.

Reviewed By: siyengar

Differential Revision: D6568209

fbshipit-source-id: 0856dba0b2d527ae68d33942b28e2c485a5b1f46

folly/io/async/AsyncTransport.h

index c42888da211144eff5bbb1042a3b40e5cbc93074..2a070a978e9316d2275845e94ba0fd2493d97d3f 100644 (file)
@@ -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<T*>(static_cast<const AsyncTransportWrapper*>(this)
         ->getUnderlyingTransport<T>());
   }
-
-  /**
-   * 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