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

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

Get the current configuration.

a const reference

Definition at line 35 of file fd_adapter.hh.

◆ config_mut()

FdAdapterConfig& FdAdapterBase::config_mut ( )

Get the current configuration (mutable)

a mutable reference

Definition at line 39 of file fd_adapter.hh.

◆ config_mutable()

FdAdapterConfig& FdAdapterBase::config_mutable ( )

Definition at line 22 of file fd_adapter.hh.

◆ listening()

bool FdAdapterBase::listening ( ) const

Get the listening flag.

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)

Set the listening flag.

[in]lis the new value for the flag

Definition at line 27 of file fd_adapter.hh.

◆ tick()

void FdAdapterBase::tick ( const  size_t)

Called periodically when time elapses.

Definition at line 42 of file fd_adapter.hh.

Member Data Documentation

◆ _cfg

FdAdapterConfig FdAdapterBase::_cfg {}

Configuration values.

Definition at line 18 of file fd_adapter.hh.

◆ _listen

bool FdAdapterBase::_listen = false

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: