proxygen
|
#include <HTTPEvent.h>
Public Types | |
enum | Type : uint8_t { Type::MESSAGE_BEGIN, Type::HEADERS_COMPLETE, Type::BODY, Type::CHUNK_HEADER, Type::CHUNK_COMPLETE, Type::TRAILERS_COMPLETE, Type::MESSAGE_COMPLETE, Type::UPGRADE } |
Public Member Functions | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, bool upgrade=false) | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, size_t length) | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, std::unique_ptr< HTTPMessage > headers) | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, std::unique_ptr< folly::IOBuf > body) | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, std::unique_ptr< HTTPHeaders > trailers) | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, std::unique_ptr< HTTPException > error) | |
HTTPEvent (HTTPCodec::StreamID streamID, Type event, UpgradeProtocol protocol) | |
Type | getEvent () const |
HTTPCodec::StreamID | getStreamID () const |
std::unique_ptr< HTTPMessage > | getHeaders () |
std::unique_ptr< folly::IOBuf > | getBody () |
std::unique_ptr< HTTPException > | getError () |
bool | isUpgrade () const |
size_t | getChunkLength () const |
std::unique_ptr< HTTPHeaders > | getTrailers () |
UpgradeProtocol | getUpgradeProtocol () |
Private Attributes | |
std::unique_ptr< HTTPMessage > | headers_ |
std::unique_ptr< folly::IOBuf > | body_ |
std::unique_ptr< HTTPHeaders > | trailers_ |
std::unique_ptr< HTTPException > | error_ |
HTTPCodec::StreamID | streamID_ |
size_t | length_ |
Type | event_ |
bool | upgrade_ |
UpgradeProtocol | protocol_ |
Helper class that holds some event in the lifecycle of an HTTP request or response.
The main use for this class is to queue up events in situations where the code handling events isn't able to process them and the thing generating events isn't able to stop.
Definition at line 27 of file HTTPEvent.h.
|
strong |
Enumerator | |
---|---|
MESSAGE_BEGIN | |
HEADERS_COMPLETE | |
BODY | |
CHUNK_HEADER | |
CHUNK_COMPLETE | |
TRAILERS_COMPLETE | |
MESSAGE_COMPLETE | |
UPGRADE |
Definition at line 29 of file HTTPEvent.h.
|
inline |
Definition at line 41 of file HTTPEvent.h.
|
inline |
|
inline |
Definition at line 58 of file HTTPEvent.h.
|
inline |
Definition at line 63 of file HTTPEvent.h.
|
inline |
Definition at line 68 of file HTTPEvent.h.
|
inline |
Definition at line 73 of file HTTPEvent.h.
|
inline |
Definition at line 78 of file HTTPEvent.h.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 83 of file HTTPEvent.h.
References event_.
Referenced by proxygen::HTTPTransaction::resumeIngress().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 113 of file HTTPEvent.h.
Referenced by getBody().
|
private |
Definition at line 115 of file HTTPEvent.h.
Referenced by getError().
|
private |
Definition at line 118 of file HTTPEvent.h.
Referenced by getChunkLength(), getEvent(), and isUpgrade().
|
private |
Definition at line 112 of file HTTPEvent.h.
Referenced by getHeaders().
|
private |
Definition at line 117 of file HTTPEvent.h.
Referenced by getChunkLength().
|
private |
Definition at line 120 of file HTTPEvent.h.
Referenced by getUpgradeProtocol().
|
private |
Definition at line 116 of file HTTPEvent.h.
Referenced by getStreamID().
|
private |
Definition at line 114 of file HTTPEvent.h.
Referenced by getTrailers().
|
private |
Definition at line 119 of file HTTPEvent.h.
Referenced by isUpgrade().