proxygen
|
#include <HTTPTransaction.h>
Public Member Functions | |
TransactionInfo () | |
TransactionInfo (std::chrono::milliseconds ttfb, std::chrono::milliseconds ttlb, uint64_t eHeader, uint64_t inHeader, uint64_t eBody, uint64_t inBody, bool completed) | |
Public Attributes | |
std::chrono::milliseconds | timeToFirstByte {0} |
std::chrono::milliseconds | timeToLastByte {0} |
uint64_t | egressHeaderBytes {0} |
uint64_t | ingressHeaderBytes {0} |
uint64_t | egressBodyBytes {0} |
uint64_t | ingressBodyBytes {0} |
bool | isCompleted {false} |
An HTTPTransaction represents a single request/response pair for some HTTP-like protocol. It works with a Transport that performs the network processing and wire-protocol formatting and a Handler that implements some sort of application logic.
The typical sequence of events for a simple application is:
For some applications, like proxying, a Handler implementation may obtain one or more upstream connections, each represented by another Transport, and create outgoing requests on the upstream connection(s), with each request represented as a new Transaction.
With a multiplexing protocol like SPDY on both sides of a proxy, the cardinality relationship can be:
+-----------+ +-----------+ +-------+
(Client-side) | Transport |1—*|Transaction|1—1|Handler| +-----——+ +-----——+ +-——+ 1 | | 1 +---——+ +-----——+ (Server-side) |Transport|1—*|Transaction| +---——+ +-----——+
A key design goal of HTTPTransaction is to serve as a protocol- independent abstraction that insulates Handlers from the semantics different of HTTP-like protocols.Info about Transaction running on this session
Definition at line 92 of file HTTPTransaction.h.
|
inline |
Definition at line 94 of file HTTPTransaction.h.
|
inline |
Definition at line 96 of file HTTPTransaction.h.
uint64_t proxygen::TransactionInfo::egressBodyBytes {0} |
Number of bytes send in body
Definition at line 123 of file HTTPTransaction.h.
uint64_t proxygen::TransactionInfo::egressHeaderBytes {0} |
Number of bytes send in headers
Definition at line 119 of file HTTPTransaction.h.
uint64_t proxygen::TransactionInfo::ingressBodyBytes {0} |
Number of bytes receive in body
Definition at line 125 of file HTTPTransaction.h.
uint64_t proxygen::TransactionInfo::ingressHeaderBytes {0} |
Number of bytes receive headers
Definition at line 121 of file HTTPTransaction.h.
bool proxygen::TransactionInfo::isCompleted {false} |
Is the transaction was completed without error
Definition at line 128 of file HTTPTransaction.h.
std::chrono::milliseconds proxygen::TransactionInfo::timeToFirstByte {0} |
Time to first byte
Definition at line 114 of file HTTPTransaction.h.
std::chrono::milliseconds proxygen::TransactionInfo::timeToLastByte {0} |
Time to last byte
Definition at line 116 of file HTTPTransaction.h.