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

Side by Side Diff: net/base/ip_endpoint.h

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 4 years, 11 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
OLDNEW
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_BASE_IP_ENDPOINT_H_ 5 #ifndef NET_BASE_IP_ENDPOINT_H_
6 #define NET_BASE_IP_ENDPOINT_H_ 6 #define NET_BASE_IP_ENDPOINT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 // * Port 26 // * Port
27 class NET_EXPORT IPEndPoint { 27 class NET_EXPORT IPEndPoint {
28 public: 28 public:
29 IPEndPoint(); 29 IPEndPoint();
30 ~IPEndPoint(); 30 ~IPEndPoint();
31 // DEPRECATED(crbug.com/496258): Use the ctor that takes IPAddress instead. 31 // DEPRECATED(crbug.com/496258): Use the ctor that takes IPAddress instead.
32 IPEndPoint(const IPAddressNumber& address, uint16_t port); 32 IPEndPoint(const IPAddressNumber& address, uint16_t port);
33 IPEndPoint(const IPAddress& address, uint16_t port); 33 IPEndPoint(const IPAddress& address, uint16_t port);
34 IPEndPoint(const IPEndPoint& endpoint); 34 IPEndPoint(const IPEndPoint& endpoint);
35 35
36 const IPAddressNumber& address() const { return address_; } 36 const IPAddressNumber& address_number() const { return address_; }
37 uint16_t port() const { return port_; } 37 uint16_t port() const { return port_; }
38 38
39 // Returns AddressFamily of the address. 39 // Returns AddressFamily of the address.
40 AddressFamily GetFamily() const; 40 AddressFamily GetFamily() const;
41 41
42 // Returns the sockaddr family of the address, AF_INET or AF_INET6. 42 // Returns the sockaddr family of the address, AF_INET or AF_INET6.
43 int GetSockAddrFamily() const; 43 int GetSockAddrFamily() const;
44 44
45 // Convert to a provided sockaddr struct. 45 // Convert to a provided sockaddr struct.
46 // |address| is the sockaddr to copy into. Should be at least 46 // |address| is the sockaddr to copy into. Should be at least
(...skipping 23 matching lines...) Expand all
70 bool operator==(const IPEndPoint& that) const; 70 bool operator==(const IPEndPoint& that) const;
71 71
72 private: 72 private:
73 IPAddressNumber address_; 73 IPAddressNumber address_;
74 uint16_t port_; 74 uint16_t port_;
75 }; 75 };
76 76
77 } // namespace net 77 } // namespace net
78 78
79 #endif // NET_BASE_IP_ENDPOINT_H_ 79 #endif // NET_BASE_IP_ENDPOINT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698