folly::WriteChainAsyncTransportWrapper

Helper class that redirects write() and writev() calls to writeChain().

Synopsis

Declared in <folly/io/async/WriteChainAsyncTransportWrapper.h>

template<class T>
class WriteChainAsyncTransportWrapper
    : public DecoratedAsyncTransportWrapper<T>

Base Classes

NameDescription
DecoratedAsyncTransportWrapper<T>Convenience class so that AsyncTransport can be decorated without having to redefine every single method.

Types

NameDescription
BufferCallback Callback class to signal changes in the transport's internal buffers.
Destructor Helper class to allow DelayedDestruction classes to be used with std::shared_ptr.
DestructorGuard Classes should create a DestructorGuard object on the stack in any function that may invoke callback functions.
IntrusivePtr This smart pointer is a convenient way to manage a concrete DelayedDestructorBase child. It can replace the equivalent raw pointer and provide automatic memory management.
RXZerocopyParams Parameters controlling receive-side zero-copy.
ReadCallback Callback interface used to receive data read from the transport.
ReleaseIOBufCallback Callback invoked to release ownership of an IOBuf after a write.
ReplaySafetyCallback Callback class to signal when a transport that did not have replay protection gains replay protection. This is needed for 0-RTT security protocols.
WriteCallback Callback interface used to report the result of a write.

Type Aliases

NameDescription
UniquePtr Owning pointer that uses the DelayedDestruction Destructor.
ZeroCopyEnableFunc Predicate deciding whether a given buffer should use zero-copy writes.

Member Functions

NameDescription
operator= [deleted]Deleted copy assignment operator.
attachEventBase attachEventBase overloads
close [virtual]Close the wrapped transport.
closeNow [virtual]Close the wrapped transport immediately.
closeWithReset [virtual]Reset the wrapped transport, sending a reset to the peer if possible.
connecting [virtual]Return whether the wrapped transport is connecting.
destroy [virtual]Destroy this wrapper and its wrapped transport.
detachEventBase [virtual]Detach the wrapped transport from its EventBase.
dropPeerCertificate [virtual]Drop the cached peer certificate of the wrapped transport.
dropSelfCertificate [virtual]Drop the cached self certificate of the wrapped transport.
error [virtual]Return whether the wrapped transport is in an error state.
getAddress [virtual]Store the local address of this transport in the given SocketAddress.
getAllocatedBytesBuffered [virtual]Return the number of allocated bytes buffered to be written later.
getAppBytesBuffered [virtual]Calculates the total number of bytes that are currently buffered in the transport to be written later.
getAppBytesReceived [virtual]Return the number of application-level bytes received.
getAppBytesWritten [virtual]Return the number of application-level bytes written.
getApplicationProtocol [virtual]Return the application protocol of the wrapped transport.
getDestroyPending Returns whether destruction has been requested but deferred.
getEventBase [virtual]Return the EventBase of the wrapped transport.
getExportedKeyingMaterial [virtual]Produce exported keying material from the wrapped transport.
getLocalAddress getLocalAddress overloads
getNapiId [virtual]Return SO_INCOMING_NAPI_ID for this transport. For socket transports, this is associated with the NAPI instance/receive queue. For other transports, it is not defined.
getPeerAddress getPeerAddress overloads
getPeerCertificate [virtual]Return the peer certificate of the wrapped transport.
getRXZeroCopy [virtual]Return whether receive-side zero-copy is enabled.
getRawBytesBuffered [virtual]Return the number of raw bytes buffered to be written later.
getRawBytesReceived [virtual]Return the number of raw bytes received.
getRawBytesWritten [virtual]Return the number of raw bytes written.
getReadCallback [virtual]Return the read callback of the wrapped transport.
getSecurityProtocol [virtual]Return the security protocol of the wrapped transport.
getSelfCertificate [virtual]Return the self certificate of the wrapped transport.
getSendTimeout [virtual]Return the send timeout of the wrapped transport.
getUnderlyingTransport getUnderlyingTransport overloads
getWrappedTransport [virtual]Return the wrapped transport.
getWrappingTransport getWrappingTransport overloads
getZeroCopy [virtual]Return whether zero-copy writes are enabled.
good [virtual]Return whether the wrapped transport is open and ready.
isDetachable [virtual]Return whether the wrapped transport can be detached.
isEorTrackingEnabled [virtual]Return whether end-of-record tracking is enabled.
isPending [virtual]Determine if the there is pending data on the transport.
isReplaySafe [virtual]Return whether the wrapped transport has replay protection.
readable [virtual]Return whether the wrapped transport is readable.
setEorTracking [virtual]Enable or disable end-of-record tracking on the wrapped transport.
setRXZeroCopy [virtual]Enable or disable receive-side zero-copy using the given parameters.
setReadCB setReadCB overloads
setReplaySafetyCallback setReplaySafetyCallback overloads
setSendTimeout setSendTimeout overloads
setZeroCopy [virtual]Enable or disable zero-copy writes on the wrapped transport.
setZeroCopyEnableFunc [virtual]Set the zero-copy enable predicate on the wrapped transport.
setZeroCopyEnableThreshold [virtual]Set the zero-copy write threshold on the wrapped transport.
shutdownWrite [virtual]Half-shutdown the write side of the wrapped transport.
shutdownWriteNow [virtual]Immediately half-shutdown the write side of the wrapped transport.
takePreReceivedData [virtual]Take any data received before a read callback was installed.
tryExchangeUnderlyingTransport Exchange the underlying transport of type T with the given one.
tryExchangeWrappedTransport [virtual]Exchange the wrapped transport with the given one.
writable [virtual]Return whether the wrapped transport is writable.
write write overloads
writeChain writeChain overloads
writev writev overloads

Using Declarations

Name
Unnamed using

Protected Member Functions

NameDescription
getDestructorGuardCount Get the number of DestructorGuards currently protecting this object.
onDelayedDestroy [virtual]Implement onDelayedDestroy in subclasses. onDelayedDestroy() is invoked when the object is potentially being destroyed.

Protected Data Members

NameDescription
transport_ The wrapped transport.