| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_SERVER_HTTP_SERVER_H_ | 5 #ifndef NET_SERVER_HTTP_SERVER_H_ |
| 6 #define NET_SERVER_HTTP_SERVER_H_ | 6 #define NET_SERVER_HTTP_SERVER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "net/http/http_status_code.h" | 17 #include "net/http/http_status_code.h" |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 class HttpConnection; | 21 class HttpConnection; |
| 22 class HttpServerRequestInfo; | 22 class HttpServerRequestInfo; |
| 23 class HttpServerResponseInfo; | 23 class HttpServerResponseInfo; |
| 24 class IPEndPoint; | 24 class IPEndPoint; |
| 25 class ServerSocket; | 25 class ServerSocket; |
| 26 class StreamSocket; | 26 class StreamSocket; |
| 27 class WebSocket; | |
| 28 | 27 |
| 29 class HttpServer { | 28 class HttpServer { |
| 30 public: | 29 public: |
| 31 // Delegate to handle http/websocket events. Beware that it is not safe to | 30 // Delegate to handle http/websocket events. Beware that it is not safe to |
| 32 // destroy the HttpServer in any of these callbacks. | 31 // destroy the HttpServer in any of these callbacks. |
| 33 class Delegate { | 32 class Delegate { |
| 34 public: | 33 public: |
| 35 virtual ~Delegate() {} | 34 virtual ~Delegate() {} |
| 36 | 35 |
| 37 virtual void OnConnect(int connection_id) = 0; | 36 virtual void OnConnect(int connection_id) = 0; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 std::map<int, std::unique_ptr<HttpConnection>> id_to_connection_; | 116 std::map<int, std::unique_ptr<HttpConnection>> id_to_connection_; |
| 118 | 117 |
| 119 base::WeakPtrFactory<HttpServer> weak_ptr_factory_; | 118 base::WeakPtrFactory<HttpServer> weak_ptr_factory_; |
| 120 | 119 |
| 121 DISALLOW_COPY_AND_ASSIGN(HttpServer); | 120 DISALLOW_COPY_AND_ASSIGN(HttpServer); |
| 122 }; | 121 }; |
| 123 | 122 |
| 124 } // namespace net | 123 } // namespace net |
| 125 | 124 |
| 126 #endif // NET_SERVER_HTTP_SERVER_H_ | 125 #endif // NET_SERVER_HTTP_SERVER_H_ |
| OLD | NEW |