Move security protocol and application protocol APIs to AsyncTransport.
[folly.git] / 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