Sponge
CS144's user-space TCP library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
FdAdapterBase Class Reference

Basic functionality for file descriptor adaptors. More...

#include <fd_adapter.hh>

Inheritance diagram for FdAdapterBase:
Inheritance graph
[legend]

Public Member Functions

const FdAdapterConfigconfig () const
 Get the current configuration. More...
 
FdAdapterConfigconfig_mut ()
 Get the current configuration (mutable) More...
 
bool listening () const
 Get the listening flag. More...
 
void set_listening (const bool l)
 Set the listening flag. More...
 
void tick (const size_t)
 Called periodically when time elapses. More...
 

Protected Member Functions

FdAdapterConfigconfig_mutable ()
 

Private Attributes

FdAdapterConfig _cfg {}
 Configuration values. More...
 
bool _listen = false
 Is the connected TCP FSM in listen state? More...
 

Detailed Description

Basic functionality for file descriptor adaptors.

See TCPOverUDPSocketAdapter and TCPOverIPv4OverTunFdAdapter for more information.

Definition at line 16 of file fd_adapter.hh.

Member Function Documentation

◆ config()

const FdAdapterConfig& FdAdapterBase::config ( ) const
inline

Get the current configuration.

Returns
a const reference

Definition at line 35 of file fd_adapter.hh.

◆ config_mut()

FdAdapterConfig& FdAdapterBase::config_mut ( )
inline

Get the current configuration (mutable)

Returns
a mutable reference

Definition at line 39 of file fd_adapter.hh.

◆ config_mutable()

FdAdapterConfig& FdAdapterBase::config_mutable ( )
inlineprotected

Definition at line 22 of file fd_adapter.hh.

◆ listening()

bool FdAdapterBase::listening ( ) const
inline

Get the listening flag.

Returns
whether the FdAdapter is listening for a new connection

Definition at line 31 of file fd_adapter.hh.

◆ set_listening()

void FdAdapterBase::set_listening ( const bool  l)
inline

Set the listening flag.

Parameters
[in]lis the new value for the flag

Definition at line 27 of file fd_adapter.hh.

◆ tick()

void FdAdapterBase::tick ( const  size_t)
inline

Called periodically when time elapses.

Definition at line 42 of file fd_adapter.hh.

Member Data Documentation

◆ _cfg

FdAdapterConfig FdAdapterBase::_cfg {}
private

Configuration values.

Definition at line 18 of file fd_adapter.hh.

◆ _listen

bool FdAdapterBase::_listen = false
private

Is the connected TCP FSM in listen state?

Definition at line 19 of file fd_adapter.hh.


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