Generic addressing type independent INet protocol facet. More...
#include <senf/Socket/Protocols/INet/INetSocketProtocol.hh>
Public Member Functions | |
void | bindInterface (std::string const &iface) const |
Bind socket to specific interface. More... | |
std::string | bindInterface () |
Get bound interface. 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 INet protocol facet.
Definition at line 40 of file INetSocketProtocol.hh.
void senf::INetSocketProtocol::bindInterface | ( | std::string const & | iface | ) | const |
Bind socket to specific interface.
When a socket is bound to an interface, it will only receive data received on that interface. If the interface name is empty, the binding is removed.
[in] | iface | name of interface to bind to or empty to remove binding |
Definition at line 33 of file INetSocketProtocol.cc.
std::string senf::INetSocketProtocol::bindInterface | ( | ) |
Get bound interface.
Returns the interface, the socket is currently bound to. Returns the empty string, if not bound to any interface.
Definition at line 40 of file INetSocketProtocol.cc.