#include <senf/Socket/Protocols/Raw/MMapSocketProtocol.hh>

Inheritance diagram for senf::MMapSocketProtocol:

Public Member Functions

void close ()
 Close socket. More...
 
void terminate () const
 Forcibly close socket. More...
 
detail::QueueInfo::TxStats txStats () const
 
detail::QueueInfo::RxStats rxStats () const
 
bool interfaceDead () const
 
void timestamping (int sofFlags)
 
- 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 state (SocketStateMap &map, unsigned lod) const
 Return socket state information. More...
 
int fd () const
 Get file descriptor. More...
 
 SocketProtocol ()
 
virtual ~SocketProtocol ()=0
 

Protected Member Functions

void init_mmap (unsigned frameSize, unsigned rxqlen, unsigned txqlen, unsigned reserve=0, bool qDiscBypass=false) const
 
void close_mmap () const
 
void terminate_mmap () const
 
- 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...
 

Protected Attributes

detail::QueueInfo qi_
 

Detailed Description

Definition at line 29 of file MMapSocketProtocol.hh.

Member Function Documentation

◆ close()

void senf::MMapSocketProtocol::close ( )
virtual

Close socket.

This override will automatically shutdown() the socket whenever it is closed.

Exceptions
senf::SystemException
Fix:
Move into (at least) BSDSOcketProtocol

Reimplemented from senf::SocketProtocol.

Definition at line 38 of file MMapSocketProtocol.cc.

◆ close_mmap()

void senf::MMapSocketProtocol::close_mmap ( ) const
protected

Definition at line 128 of file MMapSocketProtocol.cc.

◆ init_mmap()

void senf::MMapSocketProtocol::init_mmap ( unsigned  frameSize,
unsigned  rxqlen,
unsigned  txqlen,
unsigned  reserve = 0,
bool  qDiscBypass = false 
) const
protected

Definition at line 51 of file MMapSocketProtocol.cc.

◆ interfaceDead()

bool senf::MMapSocketProtocol::interfaceDead ( ) const

Definition at line 171 of file MMapSocketProtocol.cc.

◆ rxStats()

senf::detail::QueueInfo::RxStats senf::MMapSocketProtocol::rxStats ( ) const

Definition at line 155 of file MMapSocketProtocol.cc.

◆ terminate()

void senf::MMapSocketProtocol::terminate ( ) const
virtual

Forcibly close socket.

This override will automatically shutdown() the socket whenever it is called. Additionally it will disable SO_LINGER to ensure, that v_terminate will not block. Like the overridden method, this member will ignore failures and will never throw. It is therefore safe to be called from a destructor.

Fix:
Move into (at least) BSDSocketProtocol

Reimplemented from senf::SocketProtocol.

Definition at line 44 of file MMapSocketProtocol.cc.

◆ terminate_mmap()

void senf::MMapSocketProtocol::terminate_mmap ( ) const
protected

Definition at line 138 of file MMapSocketProtocol.cc.

◆ timestamping()

void senf::MMapSocketProtocol::timestamping ( int  sofFlags)

Definition at line 180 of file MMapSocketProtocol.cc.

◆ txStats()

senf::detail::QueueInfo::TxStats senf::MMapSocketProtocol::txStats ( ) const

Definition at line 147 of file MMapSocketProtocol.cc.

Member Data Documentation

◆ qi_

detail::QueueInfo senf::MMapSocketProtocol::qi_
mutableprotected

Definition at line 47 of file MMapSocketProtocol.hh.


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