(abstract) base class of all UdpSockets More...
#include <udp-socket.h>
Public Member Functions | |
virtual int | MulticastJoinGroup (uint32_t interface, const Address &groupAddress)=0 |
Corresponds to socket option MCAST_JOIN_GROUP. | |
virtual int | MulticastLeaveGroup (uint32_t interface, const Address &groupAddress)=0 |
Corresponds to socket option MCAST_LEAVE_GROUP. | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::UdpSocket. |
(abstract) base class of all UdpSockets
This class exists solely for hosting UdpSocket attributes that can be reused across different implementations, and for declaring UDP-specific multicast API.
static TypeId ns3::UdpSocket::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::UdpSocket.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Reimplemented in ns3::UdpSocketImpl.
virtual int ns3::UdpSocket::MulticastJoinGroup | ( | uint32_t | interface, | |
const Address & | groupAddress | |||
) | [pure virtual] |
Corresponds to socket option MCAST_JOIN_GROUP.
interface | interface number, or 0 | |
groupAddress | multicast group address |
Enable reception of multicast datagrams for this socket on the interface number specified. If zero is specified as the interface, then a single local interface is chosen by system. In the future, this function will generate trigger IGMP joins as necessary when IGMP is implemented, but for now, this just enables multicast datagram reception in the system if not already enabled for this interface/groupAddress combination.
This function may be called repeatedly on a given socket but each join must be for a different multicast address, or for the same multicast address but on a different interface from previous joins. This enables host multihoming, and the ability to join the same group on different interfaces.
Implemented in ns3::UdpSocketImpl.
virtual int ns3::UdpSocket::MulticastLeaveGroup | ( | uint32_t | interface, | |
const Address & | groupAddress | |||
) | [pure virtual] |
Corresponds to socket option MCAST_LEAVE_GROUP.
interface | interface number, or 0 | |
groupAddress | multicast group address |
Disable reception of multicast datagrams for this socket on the interface number specified. If zero is specified as the interfaceIndex, then a single local interface is chosen by system. In the future, this function will generate trigger IGMP leaves as necessary when IGMP is implemented, but for now, this just disables multicast datagram reception in the system if this socket is the last for this interface/groupAddress combination.
Implemented in ns3::UdpSocketImpl.