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

Unified Diff: net/udp/udp_socket_win.h

Issue 99923004: Add support of IP_MULTICAST_IF in UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: net/udp/udp_socket_win.h
diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h
index 142c692283e23c7c33f6066b2c3e62b1e7b27054..6f2877cb3f2c32faa10ecb5f2296ec4848cadbec 100644
--- a/net/udp/udp_socket_win.h
+++ b/net/udp/udp_socket_win.h
@@ -116,10 +116,10 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) {
void AllowBroadcast();
// Join the multicast group.
- // |group_address| is the group address to join, could be either
- // an IPv4 or IPv6 address.
+ // |group_address| is the group address to join, could be either an IPv4 or
+ // IPv6 address.
// Return a network error code.
- int JoinGroup(const IPAddressNumber& group_address) const;
+ int JoinGroup(const IPAddressNumber& group_address);
// Leave the multicast group.
// |group_address| is the group address to leave, could be either
@@ -128,7 +128,11 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// It's optional to leave the multicast group before destroying
// the socket. It will be done by the OS.
// Return a network error code.
- int LeaveGroup(const IPAddressNumber& group_address) const;
+ int LeaveGroup(const IPAddressNumber& group_address);
+
+ // Set interface to listen and send multicast. If |interface_index| set to 0,
+ // default interface is used.
+ int SetMulticastInterface(uint32 interface_index);
// Set the time-to-live option for UDP packets sent to the multicast
// group address. The default value of this option is 1.
@@ -207,6 +211,9 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// options that should be applied to |socket_| before Bind().
int socket_options_;
+ // Multicast interface.
+ uint32 multicast_interface_;
+
// Multicast socket options cached for SetSocketOption.
// Cannot be used after Bind().
int multicast_time_to_live_;

Powered by Google App Engine
This is Rietveld 408576698