proxygen
|
#include <AsyncTransport.h>
Public Member Functions | |
virtual | ~WriteCallback ()=default |
virtual void | writeSuccess () noexcept=0 |
virtual void | writeErr (size_t bytesWritten, const AsyncSocketException &ex) noexcept=0 |
Definition at line 619 of file AsyncTransport.h.
|
virtualdefault |
|
pure virtualnoexcept |
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. |
Implemented in folly::SSLHandshakeBase, folly::SSLClient, folly::SNIClient, folly::AlpnClient, proxygen::HTTPSession::WriteSegment, folly::BlockingWriteClient, fizz::AsyncFizzBase, wangle::AsyncSocketHandler::WriteCallback, folly::WriteCallbackBase, folly::AttachDetachClient, BlockingSocket, ProxyService::ProxyHandler, folly::test::MockWriteCallback, and WriteCallback.
Referenced by folly::AsyncSocket::failAllWrites(), TestAsyncTransport::failPendingWrites(), folly::AsyncSocket::failWrite(), HTTPUpstreamTest< SPDY3CodecPair >::handleWrite(), folly::AsyncSocket::invalidState(), fizz::FizzBase< Derived, ActionMoveVisitor, StateMachine >::moveToErrorState(), fizz::test::TEST_F(), MockCodecDownstreamTest::testGoaway(), folly::AsyncPipeWriter::write(), fizz::server::AsyncFizzServerT< SM >::writeAppData(), and fizz::client::AsyncFizzClientT< SM >::writeAppData().
|
pure virtualnoexcept |
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.
Implemented in folly::SSLHandshakeBase, folly::SSLClient, folly::SNIClient, folly::AlpnClient, proxygen::HTTPSession::WriteSegment, folly::BlockingWriteClient, fizz::AsyncFizzBase, wangle::AsyncSocketHandler::WriteCallback, folly::WriteCallbackBase, folly::AttachDetachClient, BlockingSocket, ProxyService::ProxyHandler, folly::test::MockWriteCallback, and WriteCallback.
Referenced by HTTPUpstreamTest< SPDY3CodecPair >::handleWrite(), folly::AsyncSocket::handleWrite(), MockCodecDownstreamTest::onWriteChain(), NoFlushUpstreamSessionTest::onWriteChain(), fizz::client::AsyncFizzClientT< SM >::ActionMoveVisitor::operator()(), TEST(), fizz::test::TEST_F(), TEST_F(), MockCodecDownstreamTest::testGoaway(), fizz::test::LocalTransport::writeChain(), and folly::AsyncSocket::writeImpl().