IBR-DTNSuite  0.10
ibrcommon::multicastsocket Class Reference

#include <socket.h>

Inheritance diagram for ibrcommon::multicastsocket:
Inheritance graph
Collaboration diagram for ibrcommon::multicastsocket:
Collaboration graph

Public Member Functions

 multicastsocket (const vaddress &address)
 
virtual ~multicastsocket ()
 
virtual void up () throw (socket_exception)
 
virtual void down () throw (socket_exception)
 
void join (const vaddress &group, const vinterface &iface) throw (socket_exception)
 
void leave (const vaddress &group, const vinterface &iface) throw (socket_exception)
 
- Public Member Functions inherited from ibrcommon::udpsocket
 udpsocket ()
 
 udpsocket (const vaddress &address)
 
virtual ~udpsocket ()
 
const vaddressget_address () const
 
- Public Member Functions inherited from ibrcommon::datagramsocket
virtual ~datagramsocket ()=0
 
virtual ssize_t recvfrom (char *buf, size_t buflen, int flags, ibrcommon::vaddress &addr) throw (socket_exception)
 
virtual void sendto (const char *buf, size_t buflen, int flags, const ibrcommon::vaddress &addr) throw (socket_exception)
 
- Public Member Functions inherited from ibrcommon::basesocket
virtual ~basesocket ()=0
 
virtual int fd () const throw (socket_exception)
 
virtual int release () throw (socket_exception)
 
void close () throw (socket_exception)
 
void shutdown (int how) throw (socket_exception)
 
bool ready () const
 
sa_family_t get_family () const throw (socket_exception)
 

Additional Inherited Members

- Static Public Member Functions inherited from ibrcommon::basesocket
static sa_family_t get_family (int fd) throw (socket_exception)
 
static bool hasSupport (const sa_family_t family, const int type=SOCK_DGRAM, const int protocol=0) throw ()
 
- Static Public Attributes inherited from ibrcommon::basesocket
static int DEFAULT_SOCKET_FAMILY = AF_INET6
 
static int DEFAULT_SOCKET_FAMILY_ALTERNATIVE = AF_INET
 
- Protected Types inherited from ibrcommon::basesocket
enum  socketstate { SOCKET_DOWN, SOCKET_UP, SOCKET_UNMANAGED, SOCKET_DESTROYED }
 
- Protected Member Functions inherited from ibrcommon::udpsocket
void bind (const vaddress &addr) throw (socket_exception)
 
- Protected Attributes inherited from ibrcommon::udpsocket
const vaddress _address
 

Detailed Description

Definition at line 366 of file socket.h.

Constructor & Destructor Documentation

ibrcommon::multicastsocket::multicastsocket ( const vaddress address)

Definition at line 1003 of file socket.cpp.

ibrcommon::multicastsocket::~multicastsocket ( )
virtual

Definition at line 1008 of file socket.cpp.

Member Function Documentation

void ibrcommon::multicastsocket::down ( ) throw (socket_exception)
virtual

Close and destroy the file descriptor of this socket assignment.

Exceptions
socket_exceptionif the action has failed

Reimplemented from ibrcommon::udpsocket.

Definition at line 1069 of file socket.cpp.

References ibrcommon::basesocket::_fd, ibrcommon::udpsocket::down(), and ibrcommon::basesocket::get_family().

Here is the call graph for this function:

void ibrcommon::multicastsocket::join ( const vaddress group,
const vinterface iface 
) throw (socket_exception)

Definition at line 1098 of file socket.cpp.

References group.

Referenced by dtn::net::UDPDatagramService::bind().

void ibrcommon::multicastsocket::leave ( const vaddress group,
const vinterface iface 
) throw (socket_exception)

Definition at line 1111 of file socket.cpp.

References group.

void ibrcommon::multicastsocket::up ( ) throw (socket_exception)
virtual

Create the file descriptor for this socket and bind to the interface if necessary.

Exceptions
socket_exceptionif the action has failed

Reimplemented from ibrcommon::udpsocket.

Definition at line 1012 of file socket.cpp.

References ibrcommon::basesocket::_fd, ibrcommon::udpsocket::down(), ibrcommon::basesocket::get_family(), and ibrcommon::udpsocket::up().

Here is the call graph for this function:


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