OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_BASE_HTTPSERVER_H__ | 11 #ifndef WEBRTC_RTC_BASE_HTTPSERVER_H_ |
12 #define WEBRTC_BASE_HTTPSERVER_H__ | 12 #define WEBRTC_RTC_BASE_HTTPSERVER_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
17 #include "webrtc/base/httpbase.h" | 17 #include "webrtc/base/httpbase.h" |
18 | 18 |
19 namespace rtc { | 19 namespace rtc { |
20 | 20 |
21 class AsyncSocket; | 21 class AsyncSocket; |
22 class HttpServer; | 22 class HttpServer; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 sigslot::signal1<HttpServer*> SignalCloseAllComplete; | 79 sigslot::signal1<HttpServer*> SignalCloseAllComplete; |
80 | 80 |
81 private: | 81 private: |
82 class Connection : private IHttpNotify { | 82 class Connection : private IHttpNotify { |
83 public: | 83 public: |
84 Connection(int connection_id, HttpServer* server); | 84 Connection(int connection_id, HttpServer* server); |
85 ~Connection() override; | 85 ~Connection() override; |
86 | 86 |
87 void BeginProcess(StreamInterface* stream); | 87 void BeginProcess(StreamInterface* stream); |
88 StreamInterface* EndProcess(); | 88 StreamInterface* EndProcess(); |
89 | 89 |
90 void Respond(HttpServerTransaction* transaction); | 90 void Respond(HttpServerTransaction* transaction); |
91 void InitiateClose(bool force); | 91 void InitiateClose(bool force); |
92 | 92 |
93 // IHttpNotify Interface | 93 // IHttpNotify Interface |
94 HttpError onHttpHeaderComplete(bool chunked, size_t& data_size) override; | 94 HttpError onHttpHeaderComplete(bool chunked, size_t& data_size) override; |
95 void onHttpComplete(HttpMode mode, HttpError err) override; | 95 void onHttpComplete(HttpMode mode, HttpError err) override; |
96 void onHttpClosed(HttpError err) override; | 96 void onHttpClosed(HttpError err) override; |
97 | 97 |
98 int connection_id_; | 98 int connection_id_; |
99 HttpServer* server_; | 99 HttpServer* server_; |
(...skipping 29 matching lines...) Expand all Loading... |
129 void OnConnectionClosed(HttpServer* server, int connection_id, | 129 void OnConnectionClosed(HttpServer* server, int connection_id, |
130 StreamInterface* stream); | 130 StreamInterface* stream); |
131 | 131 |
132 std::unique_ptr<AsyncSocket> listener_; | 132 std::unique_ptr<AsyncSocket> listener_; |
133 }; | 133 }; |
134 | 134 |
135 ////////////////////////////////////////////////////////////////////// | 135 ////////////////////////////////////////////////////////////////////// |
136 | 136 |
137 } // namespace rtc | 137 } // namespace rtc |
138 | 138 |
139 #endif // WEBRTC_BASE_HTTPSERVER_H__ | 139 #endif // WEBRTC_RTC_BASE_HTTPSERVER_H_ |
OLD | NEW |