gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::ListenSocketInet Class Reference

#include <socket.hh>

Inheritance diagram for gem5::ListenSocketInet:
gem5::ListenSocket gem5::Named MockListenSocket

Public Member Functions

 ListenSocketInet (const std::string &_name, int port)
 
int accept () override
 
void listen () override
 
void output (std::ostream &os) const override
 
- Public Member Functions inherited from gem5::ListenSocket
virtual ~ListenSocket ()
 
int getfd () const
 
bool islistening () const
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 

Protected Member Functions

virtual bool listen (int port)
 
- Protected Member Functions inherited from gem5::ListenSocket
void setListening ()
 
 ListenSocket (const std::string &_name)
 

Protected Attributes

int _port
 
- Protected Attributes inherited from gem5::ListenSocket
bool listening = false
 
int fd = -1
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::ListenSocket
static void disableAll ()
 
static bool allDisabled ()
 
static void loopbackOnly ()
 
static int socketCloexec (int domain, int type, int protocol)
 
static int acceptCloexec (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 
- Static Protected Member Functions inherited from gem5::ListenSocket
static void cleanup ()
 
- Static Protected Attributes inherited from gem5::ListenSocket
static bool listeningDisabled = false
 The following variables are only used by socket unit tests: listeningDisabled, anyListening, bindToLoopback.
 
static bool anyListening = false
 
static bool bindToLoopback = false
 

Detailed Description

Definition at line 141 of file socket.hh.

Constructor & Destructor Documentation

◆ ListenSocketInet()

gem5::ListenSocketInet::ListenSocketInet ( const std::string & _name,
int port )

Definition at line 177 of file socket.cc.

Member Function Documentation

◆ accept()

int gem5::ListenSocketInet::accept ( )
overridevirtual

Reimplemented from gem5::ListenSocket.

Definition at line 182 of file socket.cc.

References gem5::ListenSocket::accept(), gem5::ArmISA::i, and warn_if.

Referenced by TEST().

◆ listen() [1/2]

void gem5::ListenSocketInet::listen ( )
overridevirtual

Implements gem5::ListenSocket.

Definition at line 243 of file socket.cc.

References _port, gem5::ccprintf(), fatal_if, listen(), and gem5::Named::name().

Referenced by listen(), and listen().

◆ listen() [2/2]

◆ output()

void gem5::ListenSocketInet::output ( std::ostream & os) const
overridevirtual

Implements gem5::ListenSocket.

Definition at line 254 of file socket.cc.

References _port, and gem5::X86ISA::os.

Member Data Documentation

◆ _port

int gem5::ListenSocketInet::_port
protected

Definition at line 144 of file socket.hh.

Referenced by listen(), and output().


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

Generated on Tue Jun 18 2024 16:24:12 for gem5 by doxygen 1.11.0