proxygen
proxygen::PushHandler::InnerPushHandler Class Reference
Inheritance diagram for proxygen::PushHandler::InnerPushHandler:
proxygen::HTTPPushTransactionHandler proxygen::HTTPTransactionHandler

Public Member Functions

 InnerPushHandler (PushHandler &handler)
 
void setTransaction (HTTPTransaction *) noexceptoverride
 
void detachTransaction () noexceptoverride
 
void onError (const HTTPException &error) noexceptoverride
 
void onEgressPaused () noexceptoverride
 
void onEgressResumed () noexceptoverride
 
- Public Member Functions inherited from proxygen::HTTPPushTransactionHandler
 ~HTTPPushTransactionHandler () override
 
void onHeadersComplete (std::unique_ptr< HTTPMessage >) noexceptfinal
 
void onBody (std::unique_ptr< folly::IOBuf >) noexceptfinal
 
void onChunkHeader (size_t) noexceptfinal
 
void onChunkComplete () noexceptfinal
 
void onTrailers (std::unique_ptr< HTTPHeaders >) noexceptfinal
 
void onEOM () noexceptfinal
 
void onUpgrade (UpgradeProtocol) noexceptfinal
 
void onPushedTransaction (HTTPTransaction *) noexceptfinal
 
- Public Member Functions inherited from proxygen::HTTPTransactionHandler
virtual void onExTransaction (HTTPTransaction *) noexcept
 
virtual void onGoaway (ErrorCode) noexcept
 
virtual ~HTTPTransactionHandler ()
 

Private Attributes

PushHandlerhandler_
 

Detailed Description

Definition at line 31 of file PushHandler.h.

Constructor & Destructor Documentation

proxygen::PushHandler::InnerPushHandler::InnerPushHandler ( PushHandler handler)
inlineexplicit

Definition at line 33 of file PushHandler.h.

34  : handler_(handler) {}
void handler(int, siginfo_t *, void *)

Member Function Documentation

void proxygen::PushHandler::InnerPushHandler::detachTransaction ( )
inlineoverridevirtualnoexcept

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 37 of file PushHandler.h.

References handler_, and proxygen::PushHandler::requestComplete().

void requestComplete() noexceptoverride
Definition: PushHandler.h:23
void proxygen::PushHandler::InnerPushHandler::onEgressPaused ( )
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 41 of file PushHandler.h.

References handler_, and proxygen::RequestHandler::onEgressPaused().

41  {
43  }
virtual void onEgressPaused() noexcept
void proxygen::PushHandler::InnerPushHandler::onEgressResumed ( )
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 44 of file PushHandler.h.

References handler_, and proxygen::RequestHandler::onEgressResumed().

44  {
46  }
virtual void onEgressResumed() noexcept
void proxygen::PushHandler::InnerPushHandler::onError ( const HTTPException error)
inlineoverridevirtualnoexcept

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 38 of file PushHandler.h.

References folly::pushmi::operators::error(), handler_, and proxygen::PushHandler::onError().

38  {
39  handler_.onError(error.getProxygenError());
40  }
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
Definition: error.h:48
void onError(ProxygenError) noexceptoverride
Definition: PushHandler.h:24
void proxygen::PushHandler::InnerPushHandler::setTransaction ( HTTPTransaction txn)
inlineoverridevirtualnoexcept

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 36 of file PushHandler.h.

36 {}

Member Data Documentation

PushHandler& proxygen::PushHandler::InnerPushHandler::handler_
private

Definition at line 49 of file PushHandler.h.

Referenced by detachTransaction(), onEgressPaused(), onEgressResumed(), and onError().


The documentation for this class was generated from the following file: