Pass the least amount of info to CreateSocket and RandomBind.
CreateSocket just needs the address family for the new socket.
RandomBind just needs the (local) IP address; it will select a
port at random.
[email protected]
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/110163006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240315 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index 9dfbc8c..2d1cefd 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -216,7 +216,7 @@
void LogWrite(int result, const char* bytes, const IPEndPoint* address) const;
// Returns the OS error code (or 0 on success).
- int CreateSocket(const IPEndPoint& address);
+ int CreateSocket(int addr_family);
// Same as SendTo(), except that address is passed by pointer
// instead of by reference. It is called from Write() with |address|
@@ -234,7 +234,8 @@
// Bind().
int SetSocketOptions();
int DoBind(const IPEndPoint& address);
- int RandomBind(const IPEndPoint& address);
+ // Binds to a random port on |address|.
+ int RandomBind(const IPAddressNumber& address);
int socket_;
int addr_family_;