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

Unified Diff: net/udp/datagram_server_socket.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/datagram_server_socket.h
diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h
index 0561d8a6c7d90db8e4b63aa5ce54e2dea2e027d8..8fe3dca094131919da21c64b0184a7cab03d0dd6 100644
--- a/net/udp/datagram_server_socket.h
+++ b/net/udp/datagram_server_socket.h
@@ -69,16 +69,20 @@ class NET_EXPORT DatagramServerSocket : public DatagramSocket {
// Should be called before Listen().
virtual void AllowBroadcast() = 0;
+ // Set interface to use for multicast. If |interface_index| set to 0, default
+ // interface is used. Must be called before |JoinGroup| or |LeaveGroup|.
+ virtual int SetMulticastInterface(uint32 interface_index) = 0;
+
// Join the multicast group with address |group_address|.
// Returns a network error code.
- virtual int JoinGroup(const IPAddressNumber& group_address) const = 0;
+ virtual int JoinGroup(const IPAddressNumber& group_address) = 0;
// Leave the multicast group with address |group_address|.
// If the socket hasn't joined the group, it will be ignored.
// It's optional to leave the multicast group before destroying
// the socket. It will be done by the OS.
// Returns a network error code.
- virtual int LeaveGroup(const IPAddressNumber& group_address) const = 0;
+ virtual int LeaveGroup(const IPAddressNumber& group_address) = 0;
// Set the time-to-live option for UDP packets sent to the multicast
// group address. The default value of this option is 1.

Powered by Google App Engine
This is Rietveld 408576698