Add ability to get application protocol from AsyncTransportWrapper
[folly.git] / folly / io / async / AsyncTransport.h
index 26cafbff99d1d7b13e352e302a0cdf4aba89ff8f..13bc6c94625cb317fe90656fd6e6b53382ce58f1 100644 (file)
@@ -533,6 +533,15 @@ class AsyncTransportWrapper : virtual public AsyncTransport,
   virtual AsyncTransportWrapper* getWrappedTransport() {
     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 "";
+  }
 };
 
 } // folly