Summary: Allow underlying transport to be accessible from AsyncTransportWrapper.
There are some code paths where we need access to the real transport from
the AsyncTransportWrapper. This allows us to retrieve the underlying transport
and have clients like HTTPSession use it.
Reviewed By: afrind
Differential Revision:
D2609200
fb-gh-sync-id:
2b317d1825a005bb64468f83c64bc3f1c9bdfe2c
virtual void writeChain(WriteCallback* callback,
std::unique_ptr<IOBuf>&& buf,
WriteFlags flags = WriteFlags::NONE) override = 0;
+ /**
+ * The transport wrapper may wrap another transport. This returns the
+ * transport that is wrapped. It returns nullptr if there is no wrapped
+ * transport.
+ */
+ virtual AsyncTransportWrapper* getWrappedTransport() {
+ return nullptr;
+ }
};
} // folly