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_WEBSOCKETS_WEBSOCKET_FRAME_HANDLER_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_FRAME_HANDLER_H_ |
6 #define NET_WEBSOCKETS_WEBSOCKET_FRAME_HANDLER_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_FRAME_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "net/base/net_api.h" | 14 #include "net/base/net_export.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 class IOBuffer; | 18 class IOBuffer; |
19 class IOBufferWithSize; | 19 class IOBufferWithSize; |
20 | 20 |
21 // Handles WebSocket frame messages. | 21 // Handles WebSocket frame messages. |
22 class NET_TEST WebSocketFrameHandler { | 22 class NET_EXPORT_PRIVATE WebSocketFrameHandler { |
23 public: | 23 public: |
24 struct FrameInfo { | 24 struct FrameInfo { |
25 const char* frame_start; | 25 const char* frame_start; |
26 int frame_length; | 26 int frame_length; |
27 const char* message_start; | 27 const char* message_start; |
28 int message_length; | 28 int message_length; |
29 }; | 29 }; |
30 | 30 |
31 WebSocketFrameHandler(); | 31 WebSocketFrameHandler(); |
32 ~WebSocketFrameHandler(); | 32 ~WebSocketFrameHandler(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // Deque of IOBuffers in pending. | 75 // Deque of IOBuffers in pending. |
76 PendingDataQueue pending_buffers_; | 76 PendingDataQueue pending_buffers_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(WebSocketFrameHandler); | 78 DISALLOW_COPY_AND_ASSIGN(WebSocketFrameHandler); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace net | 81 } // namespace net |
82 | 82 |
83 #endif // NET_WEBSOCKETS_WEBSOCKET_FRAME_HANDLER_H_ | 83 #endif // NET_WEBSOCKETS_WEBSOCKET_FRAME_HANDLER_H_ |
OLD | NEW |