Commit 5acf7b92 authored by Kyle Nekritz's avatar Kyle Nekritz Committed by Facebook Github Bot

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
parent 17c08956
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment