senf::MulticastSocketProtocol Class Reference

Generic addressing type independent multicast protocol facet. More...

#include <senf/Socket/Protocols/INet/MulticastSocketProtocol.hh>

Inheritance diagram for senf::MulticastSocketProtocol:

Public Member Functions

void broadcastEnabled (bool v) const
 Enable broadcast send/receive. More...
 
bool broadcastEnabled () const
 Get broadcast send/receive state. More...
 
unsigned mcTTL () const
 Return current multicast TTL. More...
 
void mcTTL (unsigned value) const
 Set multicast TTL. More...
 
bool mcLoop () const
 Return current multicast loopback state. More...
 
void mcLoop (bool value) const
 Set multicast loopback state. More...
 
void mcIface (std::string const &iface=std::string()) const
 Set multicast send interface of the socket. More...
 
- Public Member Functions inherited from senf::SocketProtocol
virtual SocketPolicyBase const & policy () const =0
 Access the policy instance. More...
 
virtual unsigned available () const =0
 Return (maximum) number of bytes available for reading without < blocking. More...
 
virtual bool eof () const =0
 Check for end-of-file condition. More...
 
virtual void close ()
 Close socket. More...
 
virtual void terminate () const
 Forcibly close socket. More...
 
virtual void state (SocketStateMap &map, unsigned lod) const
 Return socket state information. More...
 
int fd () const
 Get file descriptor. More...
 
 SocketProtocol ()
 
virtual ~SocketProtocol ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from senf::SocketProtocol
FileHandle fh () const
 Get a FileHandle for this instance. More...
 
void fd (int) const
 Initialize file descriptor. More...
 

Detailed Description

Generic addressing type independent multicast protocol facet.

Todo:
implement complete new multicast API from RFC3678 (as far as supported by linux)
Bug:
mcLeaveSSMSource fails with EADDRNOTAVAIL

Definition at line 38 of file MulticastSocketProtocol.hh.

Member Function Documentation

◆ broadcastEnabled() [1/2]

void senf::MulticastSocketProtocol::broadcastEnabled ( bool  v) const

Enable broadcast send/receive.

If this option is enabled, broadcast UDP messages will be received on the socket and the socket will be allowed to send out broadcast UDP messages

Parameters
[in]vtrue to enable broadcast send/receive, false to disable

Definition at line 33 of file MulticastSocketProtocol.cc.

◆ broadcastEnabled() [2/2]

bool senf::MulticastSocketProtocol::broadcastEnabled ( ) const

Get broadcast send/receive state.

Returns
Current state of the broadcastEnabled() option.

Definition at line 41 of file MulticastSocketProtocol.cc.

◆ mcIface()

void senf::MulticastSocketProtocol::mcIface ( std::string const &  iface = std::string()) const

Set multicast send interface of the socket.

Parameters
[in]ifacename of interface to send multicast data from

Under current linux versions this option is broken at best. Don't use.

Definition at line 69 of file MulticastSocketProtocol.cc.

◆ mcLoop() [1/2]

bool senf::MulticastSocketProtocol::mcLoop ( ) const

Return current multicast loopback state.

Definition at line 51 of file MulticastSocketProtocol.cc.

◆ mcLoop() [2/2]

void senf::MulticastSocketProtocol::mcLoop ( bool  value) const

Set multicast loopback state.

If set to false via mcLoop(value) multicast messages will not be looped back to local sockets. Default value is true.

Definition at line 61 of file MulticastSocketProtocol.cc.

◆ mcTTL() [1/2]

unsigned senf::MulticastSocketProtocol::mcTTL ( ) const

Return current multicast TTL.

Definition at line 83 of file MulticastSocketProtocol.cc.

◆ mcTTL() [2/2]

void senf::MulticastSocketProtocol::mcTTL ( unsigned  value) const

Set multicast TTL.

Definition at line 93 of file MulticastSocketProtocol.cc.


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