Home | History | Annotate | Download | only in spdy

Lines Matching refs:spdy

5 #include "net/spdy/spdy_test_util.h"
14 #include "net/spdy/spdy_framer.h"
15 #include "net/spdy/spdy_http_utils.h"
38 MockWrite* ChopWriteFrame(const spdy::SpdyFrame& frame, int num_chunks) {
40 frame.length() + spdy::SpdyFrame::size(),
63 MockRead* ChopReadFrame(const spdy::SpdyFrame& frame, int num_chunks) {
65 frame.length() + spdy::SpdyFrame::size(),
76 spdy::SpdyHeaderBlock* headers) {
141 // Construct a SPDY packet.
149 spdy::SpdyFrame* ConstructSpdyPacket(const SpdyHeaderInfo& header_info,
154 spdy::SpdyFramer framer;
155 spdy::SpdyHeaderBlock headers;
161 spdy::SpdyFrame* frame = NULL;
163 case spdy::SYN_STREAM:
169 case spdy::SYN_REPLY:
173 case spdy::RST_STREAM:
176 case spdy::HEADERS:
189 // Construct an expected SPDY SETTINGS frame.
192 spdy::SpdyFrame* ConstructSpdySettings(spdy::SpdySettings settings) {
193 spdy::SpdyFramer framer;
197 // Construct a SPDY PING frame.
199 spdy::SpdyFrame* ConstructSpdyPing() {
200 spdy::SpdyFramer framer;
204 // Construct a SPDY GOAWAY frame.
206 spdy::SpdyFrame* ConstructSpdyGoAway() {
207 spdy::SpdyFramer framer;
211 // Construct a SPDY WINDOW_UPDATE frame.
213 spdy::SpdyFrame* ConstructSpdyWindowUpdate(
214 const spdy::SpdyStreamId stream_id, uint32 delta_window_size) {
215 spdy::SpdyFramer framer;
219 // Construct a SPDY RST_STREAM frame.
221 spdy::SpdyFrame* ConstructSpdyRstStream(spdy::SpdyStreamId stream_id,
222 spdy::SpdyStatusCodes status) {
223 spdy::SpdyFramer framer;
227 // Construct a single SPDY header entry, for validation.
267 spdy::SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[],
272 spdy::SpdyControlType type,
273 spdy::SpdyControlFlags flags,
288 spdy::SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[],
293 spdy::SpdyControlType type,
294 spdy::SpdyControlFlags flags,
306 spdy::INVALID, // Status
309 spdy::DATA_FLAG_NONE // Data Flags
318 // Constructs a standard SPDY GET SYN packet, optionally compressed
323 spdy::SpdyFrame* ConstructSpdyGet(const char* const url,
328 spdy::SYN_STREAM, // Kind = Syn
333 spdy::CONTROL_FLAG_FIN, // Control Flags
335 spdy::INVALID, // Status
338 spdy::DATA_FLAG_NONE // Data Flags
381 // Constructs a standard SPDY GET SYN packet, optionally compressed.
385 spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[],
394 // Constructs a standard SPDY GET SYN packet, optionally compressed.
398 spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[],
421 spdy::SYN_STREAM,
422 spdy::CONTROL_FLAG_FIN,
427 // Constructs a standard SPDY SYN_STREAM frame for a CONNECT request.
428 spdy::SpdyFrame* ConstructSpdyConnect(const char* const extra_headers[],
442 spdy::SYN_STREAM,
443 spdy::CONTROL_FLAG_NONE,
448 // Constructs a standard SPDY push SYN packet.
452 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[],
469 spdy::SYN_STREAM,
470 spdy::CONTROL_FLAG_NONE,
476 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[],
496 spdy::SYN_STREAM,
497 spdy::CONTROL_FLAG_NONE,
503 spdy::SpdyFrame* ConstructSpdyPush(const char* const extra_headers[],
527 spdy::SYN_STREAM,
528 spdy::CONTROL_FLAG_NONE,
534 spdy::SpdyFrame* ConstructSpdyPush(int stream_id,
546 spdy::SYN_STREAM,
547 spdy::CONTROL_FLAG_NONE,
553 spdy::SpdyFrame* ConstructSpdyPushHeaders(int stream_id,
567 spdy::HEADERS,
568 spdy::CONTROL_FLAG_NONE,
573 // Constructs a standard SPDY SYN_REPLY packet with the specified status code.
575 spdy::SpdyFrame* ConstructSpdySynReplyError(
593 spdy::SYN_REPLY,
594 spdy::CONTROL_FLAG_NONE,
599 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY GET.
603 spdy::SpdyFrame* ConstructSpdyGetSynReplyRedirect(int stream_id) {
612 // Constructs a standard SPDY SYN_REPLY packet with an Internal Server
615 spdy::SpdyFrame* ConstructSpdySynReplyError(int stream_id) {
622 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY GET.
626 spdy::SpdyFrame* ConstructSpdyGetSynReply(const char* const extra_headers[],
642 spdy::SYN_REPLY,
643 spdy::CONTROL_FLAG_NONE,
648 // Constructs a standard SPDY POST SYN packet.
653 spdy::SpdyFrame* ConstructSpdyPost(int64 content_length,
676 spdy::SYN_STREAM,
677 spdy::CONTROL_FLAG_NONE,
682 // Constructs a chunked transfer SPDY POST SYN packet.
686 spdy::SpdyFrame* ConstructChunkedSpdyPost(const char* const extra_headers[],
705 spdy::SYN_STREAM,
706 spdy::CONTROL_FLAG_NONE,
711 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY POST.
715 spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[],
732 spdy::SYN_REPLY,
733 spdy::CONTROL_FLAG_NONE,
738 // Constructs a single SPDY data frame with the default contents.
739 spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id, bool fin) {
740 spdy::SpdyFramer framer;
743 fin ? spdy::DATA_FLAG_FIN : spdy::DATA_FLAG_NONE);
746 // Constructs a single SPDY data frame with the given content.
747 spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id, const char* data,
749 spdy::SpdyFramer framer;
751 stream_id, data, len, fin ? spdy::DATA_FLAG_FIN : spdy::DATA_FLAG_NONE);
755 spdy::SpdyFrame* ConstructWrappedSpdyFrame(
756 const scoped_ptr<spdy::SpdyFrame>& frame,
759 frame->length() + spdy::SpdyFrame::size(),
763 // Construct an expected SPDY reply string.
776 spdy::SpdyHeaderBlock headers;
783 spdy::SpdyHeaderBlock::iterator next = headers.begin();
784 spdy::SpdyHeaderBlock::iterator last = headers.end();
842 MockWrite CreateMockWrite(const spdy::SpdyFrame& req) {
844 true, req.data(), req.length() + spdy::SpdyFrame::size());
848 MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq) {
853 MockWrite CreateMockWrite(const spdy::SpdyFrame& req, int seq, bool async) {
855 async, req.data(), req.length() + spdy::SpdyFrame::size(), seq);
859 MockRead CreateMockRead(const spdy::SpdyFrame& resp) {
861 true, resp.data(), resp.length() + spdy::SpdyFrame::size());
865 MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq) {
870 MockRead CreateMockRead(const spdy::SpdyFrame& resp, int seq, bool async) {
872 async, resp.data(), resp.length() + spdy::SpdyFrame::size(), seq);
877 int CombineFrames(const spdy::SpdyFrame** frames, int num_frames,
881 total_len += frames[i]->length() + spdy::SpdyFrame::size();
886 int len = frames[i]->length() + spdy::SpdyFrame::size();
981 const SpdyHeaderInfo make_spdy_header(spdy::SpdyControlType type) {
987 spdy::CONTROL_FLAG_FIN, // Control Flags
989 spdy::INVALID, // Status
992 spdy::DATA_FLAG_NONE // Data Flags