OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_ |
6 #define NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_ | 6 #define NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "net/base/request_priority.h" | 9 #include "net/base/request_priority.h" |
10 #include "net/spdy/spdy_protocol.h" | 10 #include "net/spdy/spdy_protocol.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
| 14 namespace test_spdy2 { |
| 15 |
14 // Construct a WebSocket over SPDY handshake request packet. | 16 // Construct a WebSocket over SPDY handshake request packet. |
15 spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeRequestFrame( | 17 spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeRequestFrame( |
16 const char* const headers[], | 18 const char* const headers[], |
17 int header_count, | 19 int header_count, |
18 spdy::SpdyStreamId stream_id, | 20 spdy::SpdyStreamId stream_id, |
19 RequestPriority request_priority); | 21 RequestPriority request_priority); |
20 | 22 |
21 // Construct a WebSocket over SPDY handshake response packet. | 23 // Construct a WebSocket over SPDY handshake response packet. |
22 spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeResponseFrame( | 24 spdy::SpdyFrame* ConstructSpdyWebSocketHandshakeResponseFrame( |
23 const char* const headers[], | 25 const char* const headers[], |
24 int header_count, | 26 int header_count, |
25 spdy::SpdyStreamId stream_id, | 27 spdy::SpdyStreamId stream_id, |
26 RequestPriority request_priority); | 28 RequestPriority request_priority); |
27 | 29 |
28 // Construct a WebSocket over SPDY data packet. | 30 // Construct a WebSocket over SPDY data packet. |
29 spdy::SpdyFrame* ConstructSpdyWebSocketDataFrame( | 31 spdy::SpdyFrame* ConstructSpdyWebSocketDataFrame( |
30 const char* data, | 32 const char* data, |
31 int len, | 33 int len, |
32 spdy::SpdyStreamId stream_id, | 34 spdy::SpdyStreamId stream_id, |
33 bool fin); | 35 bool fin); |
34 | 36 |
| 37 } // namespace test_spdy2 |
| 38 |
35 } // namespace net | 39 } // namespace net |
36 | 40 |
37 #endif // NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_ | 41 #endif // NET_SPDY_SPDY_WEBSOCKET_TEST_UTIL_H_ |
OLD | NEW |