#include <MulticastSocket.h>
Inherits ibrcommon::udpsocket.

Public Member Functions | |
| MulticastSocket () | |
| virtual | ~MulticastSocket () |
| void | bind (int port) |
| void | setInterface (const NetInterface &iface) |
| void | joinGroup (std::string group) |
| void | joinGroup (std::string group, const NetInterface &iface) |
| void | leaveGroup (std::string group) |
| void | leaveGroup (std::string group, const NetInterface &iface) |
Static Public Member Functions | |
| static bool | isMulticast (std::string address) |
A MulticastSocket is derived from udpsocket and provides operations for sending and receiving multicast messages over UDP.
Definition at line 20 of file MulticastSocket.h.
| ibrcommon::MulticastSocket::MulticastSocket | ( | ) |
Definition at line 18 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_socket.
| ibrcommon::MulticastSocket::~MulticastSocket | ( | ) | [virtual] |
Definition at line 39 of file MulticastSocket.cpp.
| void ibrcommon::MulticastSocket::bind | ( | int | port | ) |
Bind to a given port.
| port | UDP port |
Definition at line 74 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_sockaddr, and ibrcommon::udpsocket::_socket.
Referenced by dtn::net::IPNDAgent::componentUp().
| bool ibrcommon::MulticastSocket::isMulticast | ( | std::string | address | ) | [static] |
Checks whether a given address is a multicast address or not
| address | The address to check. |
Definition at line 43 of file MulticastSocket.cpp.
Referenced by dtn::net::IPNDAgent::IPNDAgent().
| void ibrcommon::MulticastSocket::joinGroup | ( | std::string | group, | |
| const NetInterface & | iface | |||
| ) |
Join a multicast group.
| group | The multicast group to join. | |
| iface | The interface to use for this multicast group. |
Definition at line 102 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_socket, and ibrcommon::NetInterface::getAddress().

| void ibrcommon::MulticastSocket::joinGroup | ( | std::string | group | ) |
Join a multicast group.
| group | The multicast group to join. |
Definition at line 86 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_socket.
Referenced by dtn::net::IPNDAgent::componentUp().
| void ibrcommon::MulticastSocket::leaveGroup | ( | std::string | group, | |
| const NetInterface & | iface | |||
| ) |
Leave a multicast group.
| group | The multicast group to leave. | |
| iface | The interface used for this multicast group. |
Definition at line 137 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_socket, and ibrcommon::NetInterface::getAddress().

| void ibrcommon::MulticastSocket::leaveGroup | ( | std::string | group | ) |
Leave a multicast group.
| group |
Definition at line 121 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_socket.
| void ibrcommon::MulticastSocket::setInterface | ( | const NetInterface & | iface | ) |
Set the default interface for outgoing datagrams
| iface |
Definition at line 60 of file MulticastSocket.cpp.
References ibrcommon::udpsocket::_socket, and ibrcommon::NetInterface::getAddress().
Referenced by dtn::net::IPNDAgent::componentUp().

1.7.1