proxygen
|
Public Member Functions | |
WriteSegment (HTTPSession *session, uint64_t length) | |
void | setCork (bool cork) |
void | setEOR (bool eor) |
void | detach () |
folly::WriteFlags | getFlags () |
uint64_t | getLength () const |
void | writeSuccess () noexceptoverride |
void | writeErr (size_t bytesWritten, const folly::AsyncSocketException &) noexceptoverride |
Public Member Functions inherited from folly::AsyncWriter::WriteCallback | |
virtual | ~WriteCallback ()=default |
Public Attributes | |
folly::IntrusiveListHook | listHook |
Private Member Functions | |
void | remove () |
Private Attributes | |
HTTPSession * | session_ |
uint64_t | length_ |
folly::WriteFlags | flags_ |
Helper class to track write buffers until they have been fully written and can be deleted.
Definition at line 852 of file HTTPSession.h.
proxygen::HTTPSession::WriteSegment::WriteSegment | ( | HTTPSession * | session, |
uint64_t | length | ||
) |
Definition at line 63 of file HTTPSession.cpp.
Referenced by proxygen::HTTPSession::runLoopCallback().
void proxygen::HTTPSession::WriteSegment::detach | ( | ) |
Clear the session. This is used if the session does not want to receive future notification about this segment.
Definition at line 78 of file HTTPSession.cpp.
References session_.
|
inline |
Definition at line 879 of file HTTPSession.h.
Referenced by proxygen::HTTPSession::runLoopCallback().
|
inline |
|
private |
Unlink this segment from the list.
Definition at line 71 of file HTTPSession.cpp.
References listHook, and session_.
|
inline |
Definition at line 857 of file HTTPSession.h.
References folly::CORK, and folly::unSet().
Referenced by proxygen::HTTPSession::runLoopCallback().
|
inline |
Definition at line 865 of file HTTPSession.h.
References proxygen::HTTPSession::detach(), folly::EOR, and folly::unSet().
Referenced by proxygen::HTTPSession::runLoopCallback().
|
overridevirtualnoexcept |
writeError() will be invoked if an error occurs writing the data.
bytesWritten | The number of bytes that were successfull |
ex | An exception describing the error that occurred. |
Implements folly::AsyncWriter::WriteCallback.
Definition at line 102 of file HTTPSession.cpp.
References proxygen::FilterChain< T1, T2, FilterType, set_callback, TakeOwnership >::add(), proxygen::HTTPSessionBase::attachToSessionController(), proxygen::HTTPSession::byteEventTracker_, codec, proxygen::HTTPSessionBase::codec_, proxygen::HTTPSession::draining_, proxygen::HTTPSession::drainTimeout_, proxygen::HTTPSession::flowControlTimeout_, proxygen::HTTPSessionBase::getController(), proxygen::HTTPCodec::getDefaultWindowSize(), proxygen::HTTPCodec::getProtocol(), proxygen::HTTPSession::HTTPSession(), proxygen::HTTPSessionBase::HTTPSessionBase(), proxygen::HTTPSessionBase::infoCallback_, proxygen::HTTPSession::ingressError_, proxygen::HTTPSession::ingressUpgraded_, proxygen::HTTPSession::initialReceiveWindow_, proxygen::HTTPSession::inLoopCallback_, proxygen::HTTPSession::inResume_, proxygen::isHTTP2CodecProtocol(), proxygen::localAddr, proxygen::HTTPSession::maxConcurrentIncomingStreams_, folly::gen::move, proxygen::HTTPSession::nextEgressResults_, proxygen::HTTPSessionBase::InfoCallback::onCreate(), proxygen::HTTPSession::onWriteError(), proxygen::peerAddr, proxygen::HTTPSession::pendingPause_, proxygen::HTTPSession::reads_, proxygen::HTTPSession::receiveSessionWindowSize_, proxygen::HTTPSession::receiveStreamWindowSize_, proxygen::HTTPSession::resetAfterDrainingWrites_, proxygen::HTTPSession::resetSocketOnShutdown_, session_, proxygen::HTTPSession::FlowControlTimeout::setTimeoutDuration(), proxygen::HTTPSession::setupCodec(), proxygen::HTTPSession::sock_, proxygen::HTTPSession::started_, proxygen::HTTPSession::timeout_, proxygen::HTTPSession::txnEgressQueue_, proxygen::HTTPSession::writes_, proxygen::HTTPSession::writesDraining_, and proxygen::HTTPSession::writeTimeout_.
|
overridevirtualnoexcept |
writeSuccess() will be invoked when all of the data has been successfully written.
Note that this mainly signals that the buffer containing the data to write is no longer needed and may be freed or re-used. It does not guarantee that the data has been fully transmitted to the remote endpoint. For example, on socket-based transports, writeSuccess() only indicates that the data has been given to the kernel for eventual transmission.
Implements folly::AsyncWriter::WriteCallback.
Definition at line 84 of file HTTPSession.cpp.
References length_, proxygen::HTTPSession::onWriteSuccess(), and session_.
|
private |
Definition at line 903 of file HTTPSession.h.
|
private |
Definition at line 902 of file HTTPSession.h.
Referenced by writeSuccess().
folly::IntrusiveListHook proxygen::HTTPSession::WriteSegment::listHook |
Definition at line 893 of file HTTPSession.h.
Referenced by remove().
|
private |
Definition at line 901 of file HTTPSession.h.
Referenced by detach(), remove(), writeErr(), and writeSuccess().