Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/chromeos/web_socket_proxy.h

Issue 6801008: Websocket to TCP proxy running in a separate thread (only on ChromeOS). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase+minor Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chromeos/web_socket_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_H_
6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12
13 struct sockaddr;
14
15 namespace chromeos {
16
17 class WebSocketProxy {
18 public:
19 static const size_t kReadBufferLimit = 6 * 1024 * 1024;
20
21 // Limits incoming websocket headers in initial stage of connection.
22 static const size_t kHeaderLimit = 32 * 1024;
23
24 // Limits number of simultaneously open connections.
25 static const size_t kConnPoolLimit = 1000;
26
27 WebSocketProxy(
28 const std::vector<std::string>& allowed_origins,
29 struct sockaddr* addr, int addr_len);
30 ~WebSocketProxy();
31
32 // Do not call it twice.
33 void Run();
34
35 // Terminates running server (should be called on a different thread).
36 void Shutdown();
37
38 private:
39 void* impl_;
40
41 DISALLOW_COPY_AND_ASSIGN(WebSocketProxy);
42 };
43
44 } // namespace chromeos
45
46 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chromeos/web_socket_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698