proxygen
|
#include <HTTPCodec.h>
Callback interface that users of HTTPCodec must implement
Definition at line 78 of file HTTPCodec.h.
|
inlinevirtual |
Definition at line 329 of file HTTPCodec.h.
|
inlinevirtual |
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 in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 327 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::onSynStream(), and proxygen::HTTP2Codec::parseHeadersCheckConcurrentStreams().
|
inlinevirtual |
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 in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 320 of file HTTPCodec.h.
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 in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 192 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::onRstStream(), and proxygen::HTTP2Codec::parseRstStream().
|
pure virtual |
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 |
Implemented in proxygen::HTTPSession, proxygen::MockHTTPCodecCallback, proxygen::FakeHTTPCodecCallback, proxygen::RFC1867Codec, and HTTP1xCodecCallback.
Referenced by proxygen::HTTP1xCodec::onBody(), proxygen::HTTP1xCodec::onIngress(), proxygen::HTTP2Codec::parseAllData(), proxygen::HTTP2Codec::parseDataFrameData(), and proxygen::SPDYCodec::parseIngress().
|
inlinevirtual |
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 in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, and proxygen::MockHTTPCodecCallback.
Definition at line 310 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::parseCertificate().
|
inlinevirtual |
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 in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, and proxygen::MockHTTPCodecCallback.
Definition at line 297 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::parseCertificateRequest().
|
inlinevirtual |
Called when the terminating CRLF is received to end a chunk of HTTP body data.
stream | The stream ID |
Reimplemented in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, and HTTP1xCodecCallback.
Definition at line 156 of file HTTPCodec.h.
References folly::pushmi::operators::error().
Referenced by proxygen::HTTP1xCodec::onChunkComplete().
|
inlinevirtual |
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 in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, and HTTP1xCodecCallback.
Definition at line 148 of file HTTPCodec.h.
Referenced by proxygen::HTTP1xCodec::onChunkHeader().
|
pure virtual |
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 |
Implemented in proxygen::HTTPSession, proxygen::MockHTTPCodecCallback, proxygen::FakeHTTPCodecCallback, proxygen::RFC1867Codec, and HTTP1xCodecCallback.
Referenced by proxygen::HTTP2Codec::checkConnectionError(), proxygen::SPDYCodec::failSession(), proxygen::SPDYCodec::failStream(), proxygen::HTTP1xCodec::onParserError(), proxygen::HTTP2Codec::parseHeadersDecodeFrames(), proxygen::HTTP2Codec::streamError(), and TEST().
|
inlinevirtual |
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 in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 107 of file HTTPCodec.h.
References uint16_t.
Referenced by proxygen::HTTP2Codec::parseHeadersImpl().
|
inlinevirtual |
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 in proxygen::FakeHTTPCodecCallback.
Definition at line 206 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::onIngress(), and proxygen::SPDYCodec::parseIngress().
|
inlinevirtual |
Called after a header frame is generated. This only applies to framed codecs.
Definition at line 283 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::generateHeaderCallbackWrapper().
|
inlinevirtual |
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 in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, and proxygen::MockHTTPCodecCallback.
Definition at line 220 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::onGoaway(), and proxygen::HTTP2Codec::parseGoaway().
|
pure virtual |
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 |
Implemented in proxygen::HTTPSession, proxygen::MockHTTPCodecCallback, proxygen::FakeHTTPCodecCallback, proxygen::RFC1867Codec, and HTTP1xCodecCallback.
Referenced by proxygen::HTTP1xCodec::onHeadersComplete(), proxygen::SPDYCodec::onSynCommon(), and proxygen::HTTP2Codec::parseHeadersImpl().
|
pure virtual |
Called when a new message is seen while parsing the ingress
stream | The stream ID |
msg | A newly allocated HTTPMessage |
Implemented in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, proxygen::RFC1867Codec, and HTTP1xCodecCallback.
Referenced by proxygen::SPDYCodec::deliverOnMessageBegin(), proxygen::HTTP1xCodec::onMessageBegin(), and proxygen::HTTP2Codec::parseHeadersImpl().
|
pure virtual |
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. |
Implemented in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, proxygen::RFC1867Codec, and HTTP1xCodecCallback.
Referenced by proxygen::HTTP2Codec::handleEndStream(), proxygen::HTTP1xCodec::onIngressEOF(), proxygen::HTTP1xCodec::onMessageComplete(), and proxygen::SPDYCodec::parseIngress().
|
inlinevirtual |
Called upon receipt of a valid protocol switch. Return false if protocol switch could not be completed.
Reimplemented in proxygen::FakeHTTPCodecCallback, proxygen::HTTPUpstreamSession, and proxygen::HTTPDownstreamSession.
Definition at line 271 of file HTTPCodec.h.
Referenced by proxygen::HTTP1xCodec::onHeadersComplete(), and proxygen::HTTP1xCodec::onMessageComplete().
|
inlinevirtual |
Called upon receipt of a ping reply
uniqueID | Unique identifier for the ping |
Reimplemented in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 237 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::onPing(), and proxygen::HTTP2Codec::parsePing().
|
inlinevirtual |
Called upon receipt of a ping request
uniqueID | Unique identifier for the ping |
Reimplemented in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 230 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::onPing(), and proxygen::HTTP2Codec::parsePing().
|
inlinevirtual |
Called upon receipt of a priority frame, for protocols that support dynamic priority
Reimplemented in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 263 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::parsePriority().
|
inlinevirtual |
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 in proxygen::HTTPSession, proxygen::FakeHTTPCodecCallback, and HTTP1xCodecCallback.
Definition at line 95 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::deliverOnMessageBegin(), and proxygen::HTTP2Codec::parseHeadersImpl().
|
inlinevirtual |
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 in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 251 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::handleSettings(), and proxygen::SPDYCodec::onSettings().
|
inlinevirtual |
Called upon receipt of a settings frame with ACK set, for protocols that support settings ack.
Reimplemented in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 257 of file HTTPCodec.h.
Referenced by proxygen::HTTP2Codec::parseSettings().
|
pure virtual |
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 |
Implemented in proxygen::HTTPSession, proxygen::MockHTTPCodecCallback, proxygen::FakeHTTPCodecCallback, proxygen::RFC1867Codec, and HTTP1xCodecCallback.
Referenced by proxygen::HTTP1xCodec::onMessageComplete(), and proxygen::HTTP2Codec::parseHeadersImpl().
Called upon receipt of a window update, for protocols that support flow control. For instance spdy/3 and higher.
Reimplemented in proxygen::HTTPSession, and proxygen::FakeHTTPCodecCallback.
Definition at line 243 of file HTTPCodec.h.
Referenced by proxygen::SPDYCodec::onWindowUpdate(), and proxygen::HTTP2Codec::parseWindowUpdate().