Generic addressing type independent multicast protocol facet. More...
#include <senf/Socket/Protocols/INet/MulticastSocketProtocol.hh>
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... | |
Generic addressing type independent multicast protocol facet.
Definition at line 38 of file MulticastSocketProtocol.hh.
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
[in] | v | true to enable broadcast send/receive, false to disable |
Definition at line 33 of file MulticastSocketProtocol.cc.
bool senf::MulticastSocketProtocol::broadcastEnabled | ( | ) | const |
Get broadcast send/receive state.
Definition at line 41 of file MulticastSocketProtocol.cc.
void senf::MulticastSocketProtocol::mcIface | ( | std::string const & | iface = std::string() | ) | const |
Set multicast send interface of the socket.
[in] | iface | name 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.
bool senf::MulticastSocketProtocol::mcLoop | ( | ) | const |
Return current multicast loopback state.
Definition at line 51 of file MulticastSocketProtocol.cc.
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.
unsigned senf::MulticastSocketProtocol::mcTTL | ( | ) | const |
Return current multicast TTL.
Definition at line 83 of file MulticastSocketProtocol.cc.
void senf::MulticastSocketProtocol::mcTTL | ( | unsigned | value | ) | const |
Set multicast TTL.
Definition at line 93 of file MulticastSocketProtocol.cc.