proxygen
|
#include <CodecErrorResponseHandler.h>
Public Member Functions | |
CodecErrorResponseHandler (ErrorCode statusCode) | |
void | setTransaction (HTTPTransaction *txn) noexceptoverride |
void | detachTransaction () noexceptoverride |
void | onHeadersComplete (std::unique_ptr< HTTPMessage > msg) noexceptoverride |
void | onBody (std::unique_ptr< folly::IOBuf > chain) noexceptoverride |
void | onTrailers (std::unique_ptr< HTTPHeaders > trailers) noexceptoverride |
void | onEOM () noexceptoverride |
void | onUpgrade (UpgradeProtocol protocol) noexceptoverride |
void | onError (const HTTPException &error) noexceptoverride |
void | onEgressPaused () noexceptoverride |
void | onEgressResumed () noexceptoverride |
Public Member Functions inherited from proxygen::HTTPTransactionHandler | |
virtual void | onChunkHeader (size_t) noexcept |
virtual void | onChunkComplete () noexcept |
virtual void | onPushedTransaction (HTTPTransaction *) noexcept |
virtual void | onExTransaction (HTTPTransaction *) noexcept |
virtual void | onGoaway (ErrorCode) noexcept |
virtual | ~HTTPTransactionHandler () |
Private Member Functions | |
~CodecErrorResponseHandler () override | |
Private Attributes | |
HTTPTransaction * | txn_ |
Definition at line 18 of file CodecErrorResponseHandler.h.
|
explicit |
Definition at line 20 of file CodecErrorResponseHandler.cpp.
|
overrideprivate |
Definition at line 23 of file CodecErrorResponseHandler.cpp.
Referenced by onEgressResumed().
|
overridevirtualnoexcept |
Called once after a transaction successfully completes. It will be called even if a read or write error happened earlier. This is a terminal callback, which means that the HTTPTransaction object that gives this call will be invalid after this function completes.
Implements proxygen::HTTPTransactionHandler.
Definition at line 32 of file CodecErrorResponseHandler.cpp.
|
overridevirtualnoexcept |
Can be called multiple times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress().
Implements proxygen::HTTPTransactionHandler.
Definition at line 41 of file CodecErrorResponseHandler.cpp.
|
inlineoverridevirtualnoexcept |
If the remote side's receive buffer fills up, this callback will be invoked so you can attempt to stop sending to the remote side.
Implements proxygen::HTTPTransactionHandler.
Definition at line 33 of file CodecErrorResponseHandler.h.
|
inlineoverridevirtualnoexcept |
This callback lets you know that the remote side has resumed reading and you can now continue to send data.
Implements proxygen::HTTPTransactionHandler.
Definition at line 34 of file CodecErrorResponseHandler.h.
References ~CodecErrorResponseHandler().
|
overridevirtualnoexcept |
Can be called once per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). After this callback is received, there will be no more normal ingress callbacks received (onEgress*() and onError() may still be invoked). The Handler should consider ingress complete after receiving this message. This Transaction is still valid, and work may still occur on it until detachTransaction is called.
Implements proxygen::HTTPTransactionHandler.
Definition at line 51 of file CodecErrorResponseHandler.cpp.
|
overridevirtualnoexcept |
Can be called at any time before detachTransaction(). This callback implies that an error has occurred. To determine if ingress or egress is affected, check the direciont on the HTTPException. If the direction is INGRESS, it MAY still be possible to send egress.
Implements proxygen::HTTPTransactionHandler.
Definition at line 57 of file CodecErrorResponseHandler.cpp.
References folly::pushmi::operators::error(), proxygen::HTTPTransaction::sendAbort(), and txn_.
|
overridevirtualnoexcept |
Called at most once per transaction. This is usually the first ingress callback. It is possible to get a read error before this however. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress().
Implements proxygen::HTTPTransactionHandler.
Definition at line 36 of file CodecErrorResponseHandler.cpp.
|
overridevirtualnoexcept |
Can be called any number of times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). Trailers can be received once right before the EOM of a chunked HTTP/1.1 reponse or multiple times per transaction from SPDY and HTTP/2.0 HEADERS frames.
Implements proxygen::HTTPTransactionHandler.
Definition at line 45 of file CodecErrorResponseHandler.cpp.
|
overridevirtualnoexcept |
Can be called once per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). After this callback is invoked, further data will be forwarded using the onBody() callback. Once the data transfer is completed (EOF recevied in case of CONNECT), onEOM() callback will be invoked.
Implements proxygen::HTTPTransactionHandler.
Definition at line 54 of file CodecErrorResponseHandler.cpp.
|
overridevirtualnoexcept |
Called once per transaction. This notifies the handler of which transaction it should talk to and will receive callbacks from.
Implements proxygen::HTTPTransactionHandler.
Definition at line 27 of file CodecErrorResponseHandler.cpp.
References txn_.
|
private |
Definition at line 39 of file CodecErrorResponseHandler.h.
Referenced by onError(), and setTransaction().