gem5  v21.1.0.2
Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
gem5::ListenSocket Class Reference

#include <socket.hh>

Inheritance diagram for gem5::ListenSocket:
MockListenSocket

Public Member Functions

 ListenSocket ()
 
virtual ~ListenSocket ()
 
virtual int accept (bool nodelay=false)
 
virtual bool listen (int port, bool reuse=true)
 
int getfd () const
 
bool islistening () const
 

Static Public Member Functions

static void disableAll ()
 
static bool allDisabled ()
 
static void loopbackOnly ()
 

Static Protected Member Functions

static void cleanup ()
 

Protected Attributes

bool listening
 
int fd
 

Static Protected Attributes

static bool listeningDisabled = false
 The following variables are only used by socket unit tests: listeningDisabled, anyListening, bindToLoopback. More...
 
static bool anyListening = false
 
static bool bindToLoopback = false
 

Detailed Description

Definition at line 35 of file socket.hh.

Member Function Documentation

◆ allDisabled()

bool gem5::ListenSocket::allDisabled ( )
static

◆ cleanup()

void gem5::ListenSocket::cleanup ( )
staticprotected

Definition at line 55 of file socket.cc.

References anyListening, bindToLoopback, and listeningDisabled.

◆ disableAll()

void gem5::ListenSocket::disableAll ( )
static

Definition at line 63 of file socket.cc.

References anyListening, listeningDisabled, and panic.

Referenced by gem5::pybind_init_core(), and TEST().

◆ loopbackOnly()

void gem5::ListenSocket::loopbackOnly ( )
static

Definition at line 77 of file socket.cc.

References anyListening, bindToLoopback, and panic.

Referenced by gem5::pybind_init_core().

Member Data Documentation

◆ anyListening

bool gem5::ListenSocket::anyListening = false
staticprotected

Definition at line 43 of file socket.hh.

Referenced by cleanup(), disableAll(), listen(), and loopbackOnly().

◆ bindToLoopback

bool gem5::ListenSocket::bindToLoopback = false
staticprotected

Definition at line 45 of file socket.hh.

Referenced by cleanup(), listen(), and loopbackOnly().

◆ fd

int gem5::ListenSocket::fd
protected

Definition at line 55 of file socket.hh.

Referenced by accept(), getfd(), listen(), and ~ListenSocket().

◆ listening

bool gem5::ListenSocket::listening
protected

Definition at line 54 of file socket.hh.

Referenced by islistening(), and listen().

◆ listeningDisabled

bool gem5::ListenSocket::listeningDisabled = false
staticprotected

The following variables are only used by socket unit tests: listeningDisabled, anyListening, bindToLoopback.

Definition at line 42 of file socket.hh.

Referenced by allDisabled(), cleanup(), and disableAll().


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

Generated on Tue Sep 21 2021 12:27:45 for gem5 by doxygen 1.8.17