Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / net / spdy / spdy_websocket_test_util_spdy2.h
blob3856bb68d1afb9883ce271e85169526198c54895
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_
6 #define NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_
8 #include "net/base/request_priority.h"
9 #include "net/spdy/spdy_protocol.h"
11 namespace net {
13 namespace test_spdy2 {
15 // Constructs a standard SPDY SYN_STREAM frame for WebSocket over SPDY opening
16 // handshake.
17 SpdyFrame* ConstructSpdyWebSocketSynStream(int stream_id,
18 const char* path,
19 const char* host,
20 const char* origin);
22 // Constructs a standard SPDY SYN_REPLY packet to match the WebSocket over SPDY
23 // opening handshake.
24 SpdyFrame* ConstructSpdyWebSocketSynReply(int stream_id);
26 // Constructs a WebSocket over SPDY handshake request packet.
27 SpdyFrame* ConstructSpdyWebSocketHandshakeRequestFrame(
28 const char* const headers[],
29 int header_count,
30 SpdyStreamId stream_id,
31 RequestPriority request_priority);
33 // Constructs a WebSocket over SPDY handshake response packet.
34 SpdyFrame* ConstructSpdyWebSocketHandshakeResponseFrame(
35 const char* const headers[],
36 int header_count,
37 SpdyStreamId stream_id,
38 RequestPriority request_priority);
40 // Constructs a SPDY HEADERS frame for a WebSocket frame over SPDY.
41 SpdyFrame* ConstructSpdyWebSocketHeadersFrame(int stream_id,
42 const char* length,
43 bool fin);
45 // Constructs a WebSocket over SPDY data packet.
46 SpdyFrame* ConstructSpdyWebSocketDataFrame(const char* data,
47 int len,
48 SpdyStreamId stream_id,
49 bool fin);
51 } // namespace test_spdy2
53 } // namespace net
55 #endif // NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_