IBR-DTNSuite
0.8
|
#include <MulticastSocket.h>
Public Member Functions | |
MulticastSocket (const int fd) | |
virtual | ~MulticastSocket () |
void | setInterface (const vinterface &iface) |
void | joinGroup (const vaddress &group) |
void | joinGroup (const vaddress &group, const vinterface &iface) |
void | leaveGroup (const vaddress &group) |
void | leaveGroup (const vaddress &group, const vinterface &iface) |
A MulticastSocket is derived from udpsocket and provides operations for sending and receiving multicast messages over UDP.
Definition at line 21 of file MulticastSocket.h.
ibrcommon::MulticastSocket::MulticastSocket | ( | const int | fd | ) |
Definition at line 21 of file MulticastSocket.cpp.
ibrcommon::MulticastSocket::~MulticastSocket | ( | ) | [virtual] |
Definition at line 26 of file MulticastSocket.cpp.
void ibrcommon::MulticastSocket::joinGroup | ( | const vaddress & | group | ) |
Join a multicast group.
group | The multicast group to join. |
Definition at line 60 of file MulticastSocket.cpp.
References ibrcommon::vaddress::get(), ibrcommon::vaddress::getFamily(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, and ibrcommon::vaddress::toString().
Referenced by dtn::net::IPNDAgent::componentUp(), and dtn::net::IPNDAgent::eventNotify().
void ibrcommon::MulticastSocket::joinGroup | ( | const vaddress & | group, |
const vinterface & | iface | ||
) |
Join a multicast group.
group | The multicast group to join. |
iface | The interface to use for this multicast group. |
Definition at line 79 of file MulticastSocket.cpp.
References ibrcommon::vaddress::get(), ibrcommon::vinterface::getAddresses(), ibrcommon::vaddress::getFamily(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, ibrcommon::vaddress::toString(), and ibrcommon::vaddress::VADDRESS_INET.
void ibrcommon::MulticastSocket::leaveGroup | ( | const vaddress & | group | ) |
Leave a multicast group.
group |
Definition at line 129 of file MulticastSocket.cpp.
References ibrcommon::vaddress::get(), and ibrcommon::vaddress::getFamily().
void ibrcommon::MulticastSocket::leaveGroup | ( | const vaddress & | group, |
const vinterface & | iface | ||
) |
Leave a multicast group.
group | The multicast group to leave. |
iface | The interface used for this multicast group. |
Definition at line 145 of file MulticastSocket.cpp.
References ibrcommon::vaddress::get(), and ibrcommon::vaddress::getFamily().
void ibrcommon::MulticastSocket::setInterface | ( | const vinterface & | iface | ) |
Set the default interface for outgoing datagrams
iface |
Definition at line 30 of file MulticastSocket.cpp.
References ibrcommon::vaddress::get(), ibrcommon::vinterface::getAddresses(), ibrcommon::vaddress::getFamily(), and ibrcommon::vaddress::VADDRESS_INET.