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

Unified Diff: net/base/ip_endpoint.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/iovec.h ('k') | net/base/ip_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ip_endpoint.h
diff --git a/net/base/ip_endpoint.h b/net/base/ip_endpoint.h
deleted file mode 100644
index c2639b161d6f41dac152be0e7007afb484c5d4c9..0000000000000000000000000000000000000000
--- a/net/base/ip_endpoint.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_BASE_IP_ENDPOINT_H_
-#define NET_BASE_IP_ENDPOINT_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "net/base/address_family.h"
-#include "net/base/net_export.h"
-#include "net/base/net_util.h"
-
-struct sockaddr;
-
-namespace net {
-
-// An IPEndPoint represents the address of a transport endpoint:
-// * IP address (either v4 or v6)
-// * Port
-class NET_EXPORT IPEndPoint {
- public:
- IPEndPoint();
- ~IPEndPoint();
- IPEndPoint(const IPAddressNumber& address, uint16 port);
- IPEndPoint(const IPEndPoint& endpoint);
-
- const IPAddressNumber& address() const { return address_; }
- uint16 port() const { return port_; }
-
- // Returns AddressFamily of the address.
- AddressFamily GetFamily() const;
-
- // Returns the sockaddr family of the address, AF_INET or AF_INET6.
- int GetSockAddrFamily() const;
-
- // Convert to a provided sockaddr struct.
- // |address| is the sockaddr to copy into. Should be at least
- // sizeof(struct sockaddr_storage) bytes.
- // |address_length| is an input/output parameter. On input, it is the
- // size of data in |address| available. On output, it is the size of
- // the address that was copied into |address|.
- // Returns true on success, false on failure.
- bool ToSockAddr(struct sockaddr* address, socklen_t* address_length) const
- WARN_UNUSED_RESULT;
-
- // Convert from a sockaddr struct.
- // |address| is the address.
- // |address_length| is the length of |address|.
- // Returns true on success, false on failure.
- bool FromSockAddr(const struct sockaddr* address, socklen_t address_length)
- WARN_UNUSED_RESULT;
-
- // Returns value as a string (e.g. "127.0.0.1:80"). Returns empty
- // string if the address is invalid, and cannot not be converted to a
- // string.
- std::string ToString() const;
-
- // As above, but without port.
- std::string ToStringWithoutPort() const;
-
- bool operator<(const IPEndPoint& that) const;
- bool operator==(const IPEndPoint& that) const;
-
- private:
- IPAddressNumber address_;
- uint16 port_;
-};
-
-} // namespace net
-
-#endif // NET_BASE_IP_ENDPOINT_H_
« no previous file with comments | « net/base/iovec.h ('k') | net/base/ip_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698