Avi Drissman | 6459548 | 2022-09-14 20:52:29 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors |
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 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 NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_RESPONSE_INFO_H_ | ||||
6 | #define NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_RESPONSE_INFO_H_ | ||||
7 | |||||
Bence Béky | 6562397 | 2018-03-05 15:31:56 | [diff] [blame] | 8 | #include "base/memory/scoped_refptr.h" |
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 9 | #include "base/time/time.h" |
Tsuyoshi Horo | 01faed6 | 2019-02-20 22:11:37 | [diff] [blame] | 10 | #include "net/base/ip_endpoint.h" |
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 11 | #include "net/base/net_export.h" |
12 | #include "url/gurl.h" | ||||
13 | |||||
14 | namespace net { | ||||
15 | |||||
16 | class HttpResponseHeaders; | ||||
17 | |||||
18 | struct NET_EXPORT WebSocketHandshakeResponseInfo { | ||||
19 | WebSocketHandshakeResponseInfo(const GURL& url, | ||||
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 20 | scoped_refptr<HttpResponseHeaders> headers, |
Tsuyoshi Horo | 01faed6 | 2019-02-20 22:11:37 | [diff] [blame] | 21 | const IPEndPoint& remote_endpoint, |
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 22 | base::Time response_time); |
Peter Boström | 407869b | 2021-10-07 04:42:48 | [diff] [blame] | 23 | |
24 | WebSocketHandshakeResponseInfo(const WebSocketHandshakeResponseInfo&) = | ||||
25 | delete; | ||||
26 | WebSocketHandshakeResponseInfo& operator=( | ||||
27 | const WebSocketHandshakeResponseInfo&) = delete; | ||||
28 | |||||
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 29 | ~WebSocketHandshakeResponseInfo(); |
Peter Boström | 407869b | 2021-10-07 04:42:48 | [diff] [blame] | 30 | |
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 31 | // The request URL |
32 | GURL url; | ||||
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 33 | // HTTP response headers |
34 | scoped_refptr<HttpResponseHeaders> headers; | ||||
Yutaka Hirano | 36c9495 | 2018-05-30 21:33:33 | [diff] [blame] | 35 | // Remote address of the socket. |
Tsuyoshi Horo | 01faed6 | 2019-02-20 22:11:37 | [diff] [blame] | 36 | IPEndPoint remote_endpoint; |
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 37 | // The time that this response arrived |
38 | base::Time response_time; | ||||
[email protected] | cd48ed1 | 2014-01-22 14:34:22 | [diff] [blame] | 39 | }; |
40 | |||||
41 | } // namespace net | ||||
42 | |||||
43 | #endif // NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_RESPONSE_INFO_H_ |