Chromium Code Reviews| 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..67120fee8806cada8336f1fe054ef080e81c7418 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,35 @@ 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. |
| + // |group_address| is the group address to join, could be either |
|
Sergey Ulanov
2013/06/07 19:59:38
nit: Suggest rephrasing: "Join multicast group wit
|
| + // an IPv4 or IPv6 address. |
| + // Return a network error code. |
|
Sergey Ulanov
2013/06/07 19:59:38
nit: s/Return/Returns/, here and below.
|
| + virtual int JoinGroup(const IPAddressNumber& group_address) const = 0; |
| + |
| + // Leave the multicast group. |
| + // |group_address| is the group address to leave, could be either |
|
Sergey Ulanov
2013/06/07 19:59:38
Repharase similar to JoinGroup() please.
|
| + // an IPv4 or IPv6 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. |
| + // Return 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(). |
| + // Return 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(). |
| + // Return a network error code. |
| + virtual int SetMulticastLoopbackMode(bool loopback) = 0; |
| }; |
| } // namespace net |