Protocol facet providing basic connection oriented BSD socket functions. More...
#include <senf/Socket/Protocols/BSDSocketProtocol.hh>
Inherits senf::SocketProtocol.
Inherited by senf::ConnectedRawV4SocketProtocol, senf::ConnectedRawV6SocketProtocol, senf::ConnectedUDPv4SocketProtocol, senf::ConnectedUDPv6SocketProtocol, senf::ConnectedUNDatagramSocketProtocol, senf::RawV4SocketProtocol, senf::RawV6SocketProtocol, senf::TCPv4SocketProtocol, senf::TCPv6SocketProtocol, senf::UDPv4SocketProtocol, senf::UDPv6SocketProtocol, and senf::UNDatagramSocketProtocol.
Public Member Functions | |
bool | reuseaddr () const |
Return current reuseaddr state. More... | |
void | reuseaddr (bool value) const |
Set reuseraddr state. 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... | |
Protocol facet providing basic connection oriented BSD socket functions.
AddressableBSDSocketProtocol provides the BSD socket API as it generically applies to addressable (connection oriented) sockets.
Definition at line 107 of file BSDSocketProtocol.hh.
bool senf::AddressableBSDSocketProtocol::reuseaddr | ( | ) | const |
Return current reuseaddr state.
true
if SO_REUSEADDR
is currently enabled, false
otherwise Definition at line 159 of file BSDSocketProtocol.cc.
void senf::AddressableBSDSocketProtocol::reuseaddr | ( | bool | value | ) | const |
Set reuseraddr state.
A true
value enables SO_REUSEADDR
, false
will disable it.
[in] | value | new SO_REUSEADDR state |
Definition at line 169 of file BSDSocketProtocol.cc.