Public Member Functions

ibrcommon::BroadcastSocket Class Reference

#include <BroadcastSocket.h>

Inherits ibrcommon::udpsocket.

Collaboration diagram for ibrcommon::BroadcastSocket:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BroadcastSocket ()
virtual ~BroadcastSocket ()
void bind (int port, std::string address="")
void bind (int port, const NetInterface &iface)

Detailed Description

A BroadcastSocket is derived from udpsocket and provides operations for sending and receiving broadcast messages over UDP.

Definition at line 20 of file BroadcastSocket.h.


Constructor & Destructor Documentation

ibrcommon::BroadcastSocket::BroadcastSocket (  ) 

Definition at line 13 of file BroadcastSocket.cpp.

References ibrcommon::udpsocket::_socket.

ibrcommon::BroadcastSocket::~BroadcastSocket (  )  [virtual]

Definition at line 26 of file BroadcastSocket.cpp.


Member Function Documentation

void ibrcommon::BroadcastSocket::bind ( int  port,
std::string  address = "" 
)

Bind to a given port and address.

Parameters:
port UDP port
address IP address

Definition at line 35 of file BroadcastSocket.cpp.

References ibrcommon::udpsocket::_sockaddr, and ibrcommon::udpsocket::_socket.

Referenced by bind(), dtn::net::UDPConvergenceLayer::componentUp(), and dtn::net::IPNDAgent::componentUp().

void ibrcommon::BroadcastSocket::bind ( int  port,
const NetInterface iface 
)

Bind to a given port and network interface.

Parameters:
port UDP port
iface Network interface to bind to.

Definition at line 30 of file BroadcastSocket.cpp.

References bind(), ibrcommon::NetInterface::getBroadcast(), ibrcommon::NetAddress::NETADDR_IP, and ibrcommon::NetAddress::toString().

Here is the call graph for this function:


The documentation for this class was generated from the following files: