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 CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_H_
6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_H_
11 #include "base/basictypes.h"
15 class WebSocketProxy
{
17 static const size_t kBufferLimit
= 12 * 1024 * 1024;
19 // Limits incoming websocket headers in initial stage of connection.
20 static const size_t kHeaderLimit
= 32 * 1024;
22 // Limits number of simultaneously open connections.
23 static const size_t kConnPoolLimit
= 40;
28 // Do not call it twice.
31 // Terminates running server (should be called on a different thread).
34 // Call this on network change.
35 void OnNetworkChange();
40 DISALLOW_COPY_AND_ASSIGN(WebSocketProxy
);
43 } // namespace chromeos
45 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_H_