| Index: net/udp/datagram_server_socket.h
|
| diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h
|
| index a1aa38bdefff72a8a24f7c2e263ade0b3b55af73..f2016c0e0d04916d4e14926c54360a3b3c2e011a 100644
|
| --- a/net/udp/datagram_server_socket.h
|
| +++ b/net/udp/datagram_server_socket.h
|
| @@ -6,6 +6,7 @@
|
| #define NET_UDP_DATAGRAM_SERVER_SOCKET_H_
|
|
|
| #include "net/base/completion_callback.h"
|
| +#include "net/base/net_util.h"
|
| #include "net/udp/datagram_socket.h"
|
|
|
| namespace net {
|
| @@ -67,6 +68,31 @@ class NET_EXPORT DatagramServerSocket : public DatagramSocket {
|
| // Allow sending and receiving packets to and from broadcast addresses.
|
| // Should be called before Listen().
|
| virtual void AllowBroadcast() = 0;
|
| +
|
| + // Join the multicast group with address |group_address|.
|
| + // Returns a network error code.
|
| + virtual int JoinGroup(const IPAddressNumber& group_address) const = 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;
|
| +
|
| + // Set the time-to-live option for UDP packets sent to the multicast
|
| + // group address. The default value of this option is 1.
|
| + // Cannot be negative or more than 255.
|
| + // Should be called before Bind().
|
| + // Returns a network error code.
|
| + virtual int SetMulticastTimeToLive(int time_to_live) = 0;
|
| +
|
| + // Set the loopback flag for UDP socket. If this flag is true, the host
|
| + // will receive packets sent to the joined group from itself.
|
| + // The default value of this option is true.
|
| + // Should be called before Bind().
|
| + // Returns a network error code.
|
| + virtual int SetMulticastLoopbackMode(bool loopback) = 0;
|
| };
|
|
|
| } // namespace net
|
|
|