proxygen
|
#include <TestUtils.h>
Definition at line 107 of file TestUtils.h.
|
inline |
Definition at line 109 of file TestUtils.h.
|
inline |
Definition at line 337 of file TestUtils.h.
References aborts, assocStreamId, bodyCalls, bodyLength, certificateRequests, certificates, chunkComplete, chunkHeaders, controlStreamId, goaways, headerFrames, headersComplete, headersCompleteId, isUnidirectional, lastCertId, lastCertRequestId, maxStreams, messageBegin, paddingBytes, recvPingReply, recvPingRequest, sessionErrors, settings, settingsAcks, streamErrors, trailers, windowSize, and windowUpdateCalls.
|
inline |
Definition at line 256 of file TestUtils.h.
References expectMessageHelper().
|
inline |
Definition at line 260 of file TestUtils.h.
References expectMessageHelper().
|
inline |
Definition at line 265 of file TestUtils.h.
References EXPECT_EQ, EXPECT_NE, headersComplete, messageBegin, messageComplete, msg, sessionErrors, statusCode, and streamErrors.
Referenced by expectMessage().
|
inline |
Definition at line 291 of file TestUtils.h.
References folly::netops::bind(), and sessionError().
Referenced by parseSPDY().
|
inlineoverridevirtual |
Return the number of open streams started by the remote side. Parallel codecs with a maximum number of streams will invoke this to determine if a new stream exceeds the limit.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 252 of file TestUtils.h.
References messageBegin.
|
inlineoverridevirtual |
Return the number of open streams started by this codec callback. Parallel codecs with a maximum number of streams will invoke this to determine if a new stream exceeds the limit.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 248 of file TestUtils.h.
|
inlineoverridevirtual |
Called when the peer has asked to shut down a stream immediately.
stream | The stream ID |
code | The code the stream was aborted with |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 171 of file TestUtils.h.
References aborts, and lastErrorCode.
|
inlineoverridevirtual |
Called for each block of message body data
stream | The stream ID |
chain | One or more buffers of body data. The codec will remove any protocol framing, such as HTTP/1.1 chunk headers, from the buffers before calling this function. |
padding | Number of pad bytes that came with the data segment |
Implements proxygen::HTTPCodec::Callback.
Definition at line 134 of file TestUtils.h.
References folly::IOBufQueue::append(), bodyCalls, bodyLength, folly::IOBuf::computeChainDataLength(), data, folly::gen::move, and paddingBytes.
|
inlineoverridevirtual |
Called upon receipt of an authenticator, for protocols that support secondary certificate authentication.
certId | The Cert-ID identifying this authenticator |
authenticator | The authenticator request |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 234 of file TestUtils.h.
References folly::IOBufQueue::append(), certificates, data, lastCertId, and folly::gen::move.
|
inlineoverridevirtual |
Called upon receipt of a certificate request frame, for protocols that support secondary certificate authentication.
requestId | The Request-ID identifying the certificate request |
authRequest | The authenticator request |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 227 of file TestUtils.h.
References folly::IOBufQueue::append(), certificateRequests, data, lastCertRequestId, and folly::gen::move.
|
inlineoverridevirtual |
Called when the terminating CRLF is received to end a chunk of HTTP body data.
stream | The stream ID |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 146 of file TestUtils.h.
References chunkComplete.
|
inlineoverridevirtual |
Called for each HTTP chunk header.
onChunkHeader() will be called when the chunk header is received. As the chunk data arrives, it will be passed to the callback normally with onBody() calls. Note that the chunk data may arrive in multiple onBody() calls: it is not guaranteed to arrive in a single onBody() call.
After the chunk data has been received and the terminating CRLF has been received, onChunkComplete() will be called.
stream | The stream ID |
length | The chunk length. |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 142 of file TestUtils.h.
References chunkHeaders.
|
inlineoverridevirtual |
Called when a parsing or protocol error has occurred
stream | The stream ID |
error | Description of the error |
newTxn | true if onMessageBegin has not been called for txn |
Implements proxygen::HTTPCodec::Callback.
Definition at line 160 of file TestUtils.h.
References folly::pushmi::operators::error(), lastParseError, sessionErrors, sessionStreamId, and streamErrors.
|
inlineoverridevirtual |
Called when a new extended message is seen while parsing the ingress.
stream | The stream ID |
controlStream | The stream ID of the associated stream, which can never be 0 |
msg | A newly allocated HTTPMessage |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 120 of file TestUtils.h.
References controlStreamId, isUnidirectional, and messageBegin.
|
inlineoverridevirtual |
Called upon receipt of a frame header.
stream_id | The stream ID |
flags | The flags field of frame header |
length | The length field of frame header |
type | The type field of frame header |
version | The version of frame (SPDY only) |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 176 of file TestUtils.h.
References headerFrames.
|
inlineoverridevirtual |
Called upon receipt of a goaway.
lastGoodStreamID | Last successful stream created by the receiver |
code | The code the connection was aborted with |
debugData | The additional debug data for diagnostic purpose |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 185 of file TestUtils.h.
References folly::IOBufQueue::append(), data, goaways, goawayStreamIds, and folly::gen::move.
|
inlineoverridevirtual |
Called when all the headers of an ingress message have been parsed
stream | The stream ID |
msg | The message |
size | Size of the ingress header |
Implements proxygen::HTTPCodec::Callback.
Definition at line 128 of file TestUtils.h.
References headersComplete, headersCompleteId, folly::gen::move, msg, and stream.
|
inlineoverridevirtual |
Called when a new message is seen while parsing the ingress
stream | The stream ID |
msg | A newly allocated HTTPMessage |
Implements proxygen::HTTPCodec::Callback.
Definition at line 111 of file TestUtils.h.
References messageBegin.
|
inlineoverridevirtual |
Called at end of a message (including body and trailers, if applicable)
stream | The stream ID |
upgrade | Whether the connection has been upgraded to another protocol. |
Implements proxygen::HTTPCodec::Callback.
Definition at line 156 of file TestUtils.h.
References messageComplete.
|
inlineoverridevirtual |
Called upon receipt of a valid protocol switch. Return false if protocol switch could not be completed.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 241 of file TestUtils.h.
|
inlineoverridevirtual |
Called upon receipt of a ping reply
uniqueID | Unique identifier for the ping |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 197 of file TestUtils.h.
References recvPingReply.
|
inlineoverridevirtual |
Called upon receipt of a ping request
uniqueID | Unique identifier for the ping |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 193 of file TestUtils.h.
References recvPingRequest.
|
inlineoverridevirtual |
Called upon receipt of a priority frame, for protocols that support dynamic priority
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 201 of file TestUtils.h.
References priority.
|
inlineoverridevirtual |
Called when a new push message is seen while parsing the ingress.
stream | The stream ID |
assocStream | The stream ID of the associated stream, which can never be 0 |
msg | A newly allocated HTTPMessage |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 114 of file TestUtils.h.
References assocStreamId, and messageBegin.
|
inlineoverridevirtual |
Called upon receipt of a settings frame, for protocols that support settings.
settings | a list of settings that were sent in the settings frame |
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 211 of file TestUtils.h.
References proxygen::INITIAL_WINDOW_SIZE, proxygen::MAX_CONCURRENT_STREAMS, maxStreams, numSettings, settings, and windowSize.
|
inlineoverridevirtual |
Called upon receipt of a settings frame with ACK set, for protocols that support settings ack.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 223 of file TestUtils.h.
References settingsAcks.
|
inlineoverridevirtual |
Called when all the trailers of an ingress message have been parsed, but only if the number of trailers is nonzero.
stream | The stream ID |
trailers | The message trailers |
Implements proxygen::HTTPCodec::Callback.
Definition at line 149 of file TestUtils.h.
References folly::gen::move, msg, and trailers.
|
inlineoverridevirtual |
Called upon receipt of a window update, for protocols that support flow control. For instance spdy/3 and higher.
Reimplemented from proxygen::HTTPCodec::Callback.
Definition at line 206 of file TestUtils.h.
References stream, windowUpdateCalls, and windowUpdates.
|
inline |
Definition at line 299 of file TestUtils.h.
References aborts, assocStreamId, bodyCalls, bodyLength, certificateRequests, certificates, chunkComplete, chunkHeaders, controlStreamId, data, goaways, headerFrames, headersComplete, headersCompleteId, isUnidirectional, lastCertId, lastCertRequestId, lastErrorCode, lastParseError, maxStreams, messageBegin, messageComplete, folly::IOBufQueue::move(), msg, proxygen::NO_ERROR, paddingBytes, priority, recvPingReply, recvPingRequest, sessionErrors, settings, settingsAcks, streamErrors, trailers, windowSize, windowUpdateCalls, and windowUpdates.
Referenced by TEST().
|
inline |
|
inline |
Definition at line 295 of file TestUtils.h.
References sessionStreamId.
uint32_t proxygen::FakeHTTPCodecCallback::aborts {0} |
Definition at line 383 of file TestUtils.h.
Referenced by dumpCounters(), onAbort(), and reset().
HTTPCodec::StreamID proxygen::FakeHTTPCodecCallback::assocStreamId {0} |
Definition at line 370 of file TestUtils.h.
Referenced by dumpCounters(), onPushMessageBegin(), reset(), and TEST().
uint32_t proxygen::FakeHTTPCodecCallback::bodyCalls {0} |
Definition at line 377 of file TestUtils.h.
Referenced by dumpCounters(), onBody(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::bodyLength {0} |
Definition at line 378 of file TestUtils.h.
Referenced by dumpCounters(), onBody(), reset(), and TEST().
uint32_t proxygen::FakeHTTPCodecCallback::certificateRequests {0} |
Definition at line 393 of file TestUtils.h.
Referenced by dumpCounters(), onCertificateRequest(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::certificates {0} |
Definition at line 395 of file TestUtils.h.
Referenced by dumpCounters(), onCertificate(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::chunkComplete {0} |
Definition at line 381 of file TestUtils.h.
Referenced by dumpCounters(), onChunkComplete(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::chunkHeaders {0} |
Definition at line 380 of file TestUtils.h.
Referenced by dumpCounters(), onChunkHeader(), and reset().
HTTPCodec::StreamID proxygen::FakeHTTPCodecCallback::controlStreamId {0} |
Definition at line 371 of file TestUtils.h.
Referenced by dumpCounters(), onExMessageBegin(), and reset().
folly::IOBufQueue proxygen::FakeHTTPCodecCallback::data |
Definition at line 402 of file TestUtils.h.
Referenced by onBody(), onCertificate(), onCertificateRequest(), onGoaway(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::goaways {0} |
Definition at line 384 of file TestUtils.h.
Referenced by dumpCounters(), onGoaway(), reset(), and TEST().
std::vector<HTTPCodec::StreamID> proxygen::FakeHTTPCodecCallback::goawayStreamIds |
Definition at line 407 of file TestUtils.h.
Referenced by onGoaway().
uint32_t proxygen::FakeHTTPCodecCallback::headerFrames {0} |
Definition at line 399 of file TestUtils.h.
Referenced by dumpCounters(), onFrameHeader(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::headersComplete {0} |
Definition at line 375 of file TestUtils.h.
Referenced by dumpCounters(), expectMessageHelper(), onHeadersComplete(), reset(), and TEST().
HTTPCodec::StreamID proxygen::FakeHTTPCodecCallback::headersCompleteId {0} |
Definition at line 369 of file TestUtils.h.
Referenced by dumpCounters(), onHeadersComplete(), and reset().
bool proxygen::FakeHTTPCodecCallback::isUnidirectional {false} |
Definition at line 372 of file TestUtils.h.
Referenced by dumpCounters(), onExMessageBegin(), and reset().
uint16_t proxygen::FakeHTTPCodecCallback::lastCertId {0} |
Definition at line 396 of file TestUtils.h.
Referenced by dumpCounters(), onCertificate(), and reset().
uint16_t proxygen::FakeHTTPCodecCallback::lastCertRequestId {0} |
Definition at line 394 of file TestUtils.h.
Referenced by dumpCounters(), onCertificateRequest(), and reset().
ErrorCode proxygen::FakeHTTPCodecCallback::lastErrorCode |
Definition at line 406 of file TestUtils.h.
std::unique_ptr<HTTPException> proxygen::FakeHTTPCodecCallback::lastParseError |
Definition at line 405 of file TestUtils.h.
uint64_t proxygen::FakeHTTPCodecCallback::maxStreams {0} |
Definition at line 398 of file TestUtils.h.
Referenced by dumpCounters(), onSettings(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::messageBegin {0} |
Definition at line 374 of file TestUtils.h.
Referenced by dumpCounters(), expectMessageHelper(), numIncomingStreams(), onExMessageBegin(), onMessageBegin(), onPushMessageBegin(), reset(), and TEST().
uint32_t proxygen::FakeHTTPCodecCallback::messageComplete {0} |
Definition at line 376 of file TestUtils.h.
Referenced by expectMessageHelper(), onMessageComplete(), reset(), and TEST().
std::unique_ptr<HTTPMessage> proxygen::FakeHTTPCodecCallback::msg |
Definition at line 404 of file TestUtils.h.
Referenced by doEmptyHeaderValueTest(), expectMessageHelper(), onHeadersComplete(), onTrailersComplete(), reset(), and TEST().
uint64_t proxygen::FakeHTTPCodecCallback::numSettings {0} |
Definition at line 391 of file TestUtils.h.
Referenced by onSettings().
uint32_t proxygen::FakeHTTPCodecCallback::paddingBytes {0} |
Definition at line 379 of file TestUtils.h.
Referenced by dumpCounters(), onBody(), and reset().
HTTPMessage::HTTPPriority proxygen::FakeHTTPCodecCallback::priority {0, false, 0} |
Definition at line 400 of file TestUtils.h.
Referenced by proxygen::MATCHER_P(), onPriority(), and reset().
uint64_t proxygen::FakeHTTPCodecCallback::recvPingReply {0} |
Definition at line 388 of file TestUtils.h.
Referenced by dumpCounters(), onPingReply(), reset(), and TEST().
uint64_t proxygen::FakeHTTPCodecCallback::recvPingRequest {0} |
Definition at line 387 of file TestUtils.h.
Referenced by dumpCounters(), onPingRequest(), reset(), and TEST().
uint32_t proxygen::FakeHTTPCodecCallback::sessionErrors {0} |
Definition at line 385 of file TestUtils.h.
Referenced by doEmptyHeaderValueTest(), doShortSynReplyTest(), dumpCounters(), expectMessageHelper(), maxTransactionHelper(), onError(), reset(), sessionError(), and TEST().
HTTPCodec::StreamID proxygen::FakeHTTPCodecCallback::sessionStreamId {0} |
Definition at line 373 of file TestUtils.h.
Referenced by onError(), and setSessionStreamId().
uint32_t proxygen::FakeHTTPCodecCallback::settings {0} |
Definition at line 390 of file TestUtils.h.
Referenced by dumpCounters(), onSettings(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::settingsAcks {0} |
Definition at line 392 of file TestUtils.h.
Referenced by dumpCounters(), onSettingsAck(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::streamErrors {0} |
Definition at line 386 of file TestUtils.h.
Referenced by doEmptyHeaderValueTest(), doShortSynReplyTest(), dumpCounters(), expectMessageHelper(), maxTransactionHelper(), onError(), reset(), and TEST().
uint32_t proxygen::FakeHTTPCodecCallback::trailers {0} |
Definition at line 382 of file TestUtils.h.
Referenced by dumpCounters(), onTrailersComplete(), and reset().
uint64_t proxygen::FakeHTTPCodecCallback::windowSize {0} |
Definition at line 397 of file TestUtils.h.
Referenced by dumpCounters(), onSettings(), and reset().
uint32_t proxygen::FakeHTTPCodecCallback::windowUpdateCalls {0} |
Definition at line 389 of file TestUtils.h.
Referenced by dumpCounters(), onWindowUpdate(), and reset().
std::map<proxygen::HTTPCodec::StreamID, std::vector<uint32_t> > proxygen::FakeHTTPCodecCallback::windowUpdates |
Definition at line 401 of file TestUtils.h.
Referenced by onWindowUpdate(), and reset().