proxygen
|
#include <WriteChainAsyncTransportWrapper.h>
Public Member Functions | |
void | write (folly::AsyncTransportWrapper::WriteCallback *callback, const void *buf, size_t bytes, folly::WriteFlags flags=folly::WriteFlags::NONE) override |
void | writev (folly::AsyncTransportWrapper::WriteCallback *callback, const iovec *vec, size_t count, folly::WriteFlags flags=folly::WriteFlags::NONE) override |
void | writeChain (folly::AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, folly::WriteFlags flags=folly::WriteFlags::NONE) override=0 |
Public Member Functions inherited from folly::DecoratedAsyncTransportWrapper< T > | |
DecoratedAsyncTransportWrapper (typename T::UniquePtr transport) | |
const AsyncTransportWrapper * | getWrappedTransport () const override |
ReadCallback * | getReadCallback () const override |
void | setReadCB (folly::AsyncTransportWrapper::ReadCallback *callback) override |
folly::EventBase * | getEventBase () const override |
void | attachEventBase (folly::EventBase *eventBase) override |
void | close () override |
void | closeNow () override |
void | closeWithReset () override |
bool | connecting () const override |
void | detachEventBase () override |
bool | error () const override |
size_t | getAppBytesReceived () const override |
size_t | getAppBytesWritten () const override |
void | getLocalAddress (folly::SocketAddress *address) const override |
void | getPeerAddress (folly::SocketAddress *address) const override |
folly::ssl::X509UniquePtr | getPeerCert () const override |
size_t | getRawBytesReceived () const override |
size_t | getRawBytesWritten () const override |
uint32_t | getSendTimeout () const override |
bool | good () const override |
bool | isDetachable () const override |
bool | isEorTrackingEnabled () const override |
bool | readable () const override |
bool | writable () const override |
void | setEorTracking (bool track) override |
void | setSendTimeout (uint32_t timeoutInMs) override |
void | shutdownWrite () override |
void | shutdownWriteNow () override |
std::string | getApplicationProtocol () const noexceptoverride |
std::string | getSecurityProtocol () const override |
bool | isReplaySafe () const override |
void | setReplaySafetyCallback (folly::AsyncTransport::ReplaySafetyCallback *callback) override |
const AsyncTransportCertificate * | getPeerCertificate () const override |
const AsyncTransportCertificate * | getSelfCertificate () const override |
Public Member Functions inherited from folly::AsyncTransportWrapper | |
template<class T > | |
const T * | getUnderlyingTransport () const |
template<class T > | |
T * | getUnderlyingTransport () |
Public Member Functions inherited from folly::AsyncTransport | |
virtual bool | isPending () const |
SocketAddress | getLocalAddress () const |
void | getAddress (SocketAddress *address) const override |
SocketAddress | getPeerAddress () const |
virtual const X509 * | getSelfCert () const |
Public Member Functions inherited from folly::DelayedDestruction | |
virtual void | destroy () |
bool | getDestroyPending () const |
Public Member Functions inherited from folly::DelayedDestructionBase | |
virtual | ~DelayedDestructionBase ()=default |
Public Member Functions inherited from folly::AsyncSocketBase | |
virtual | ~AsyncSocketBase ()=default |
Additional Inherited Members | |
Public Types inherited from folly::AsyncTransportWrapper | |
using | UniquePtr = std::unique_ptr< AsyncTransportWrapper, Destructor > |
using | ReadCallback = AsyncReader::ReadCallback |
using | WriteCallback = AsyncWriter::WriteCallback |
Public Types inherited from folly::AsyncTransport | |
typedef std::unique_ptr< AsyncTransport, Destructor > | UniquePtr |
Protected Member Functions inherited from folly::DecoratedAsyncTransportWrapper< T > | |
~DecoratedAsyncTransportWrapper () override | |
Protected Member Functions inherited from folly::AsyncTransport | |
~AsyncTransport () override=default | |
Protected Member Functions inherited from folly::DelayedDestruction | |
~DelayedDestruction () override=default | |
DelayedDestruction () | |
Protected Member Functions inherited from folly::DelayedDestructionBase | |
DelayedDestructionBase () | |
uint32_t | getDestructorGuardCount () const |
Protected Member Functions inherited from folly::AsyncReader | |
virtual | ~AsyncReader ()=default |
Protected Member Functions inherited from folly::AsyncWriter | |
virtual | ~AsyncWriter ()=default |
Protected Attributes inherited from folly::DecoratedAsyncTransportWrapper< T > | |
T::UniquePtr | transport_ |
Helper class that redirects write() and writev() calls to writeChain().
Definition at line 28 of file WriteChainAsyncTransportWrapper.h.
|
inlineoverridevirtual |
If you supply a non-null WriteCallback, exactly one of writeSuccess() or writeErr() will be invoked when the write completes. If you supply the same WriteCallback object for multiple write() calls, it will be invoked exactly once per call. The only way to cancel outstanding write requests is to close the socket (e.g., with closeNow() or shutdownWriteNow()). When closing the socket this way, writeErr() will still be invoked once for each outstanding write operation.
Reimplemented from folly::DecoratedAsyncTransportWrapper< T >.
Definition at line 33 of file WriteChainAsyncTransportWrapper.h.
Referenced by folly::test::TEST().
|
overridepure virtual |
It only makes sense to use this class if you override writeChain, so force derived classes to do that.
Reimplemented from folly::DecoratedAsyncTransportWrapper< T >.
Implemented in fizz::AsyncFizzBase, and folly::test::TestWriteChainAsyncTransportWrapper.
Referenced by folly::WriteChainAsyncTransportWrapper< folly::AsyncTransportWrapper >::write(), and folly::WriteChainAsyncTransportWrapper< folly::AsyncTransportWrapper >::writev().
|
inlineoverridevirtual |
If you supply a non-null WriteCallback, exactly one of writeSuccess() or writeErr() will be invoked when the write completes. If you supply the same WriteCallback object for multiple write() calls, it will be invoked exactly once per call. The only way to cancel outstanding write requests is to close the socket (e.g., with closeNow() or shutdownWriteNow()). When closing the socket this way, writeErr() will still be invoked once for each outstanding write operation.
Reimplemented from folly::DecoratedAsyncTransportWrapper< T >.
Definition at line 42 of file WriteChainAsyncTransportWrapper.h.
Referenced by folly::test::TEST().