join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
ReactorTest Class Reference

Class used to test Reactor. More...

Inheritance diagram for ReactorTest:
Collaboration diagram for ReactorTest:

Protected Member Functions

void SetUp () override
 Sets up the test fixture.
 
void TearDown () override
 Tears down the test fixture.
 
virtual void onReceive () override
 method called when data are ready to be read/accepted on handle.
 
virtual void onClose () override
 method called when handle is closed.
 
virtual void onError () override
 method called when an error occured on handle.
 
virtual int handle () const noexcept override
 get native handle.
 
- Protected Member Functions inherited from join::EventHandler

Static Protected Attributes

static Tcp::Acceptor _acceptor
 server socket.
 
static Tcp::Socket _client
 client socket.
 
static Tcp::Socket _server
 server socket.
 
static std::string _host = "127.0.0.1"
 host.
 
static uint16_t _port = 5000
 port.
 
static const int _timeout = 1000
 timeout.
 
static Condition _cond
 condition variable.
 
static Mutex _mut
 condition mutex.
 
static std::string _event
 event.
 

Additional Inherited Members

- Public Member Functions inherited from join::EventHandler
 EventHandler ()=default
 create instance.
 
virtual ~EventHandler ()=default
 destroy instance.
 

Detailed Description

Class used to test Reactor.

Member Function Documentation

◆ handle()

virtual int ReactorTest::handle ( ) const
inlineoverrideprotectedvirtualnoexcept

get native handle.

Returns
native handle.

Implements join::EventHandler.

◆ onClose()

virtual void ReactorTest::onClose ( )
inlineoverrideprotectedvirtual

method called when handle is closed.

Reimplemented from join::EventHandler.

◆ onError()

virtual void ReactorTest::onError ( )
inlineoverrideprotectedvirtual

method called when an error occured on handle.

Reimplemented from join::EventHandler.

◆ onReceive()

virtual void ReactorTest::onReceive ( )
inlineoverrideprotectedvirtual

method called when data are ready to be read/accepted on handle.

Reimplemented from join::EventHandler.

◆ SetUp()

void ReactorTest::SetUp ( )
inlineoverrideprotected

Sets up the test fixture.

◆ TearDown()

void ReactorTest::TearDown ( )
inlineoverrideprotected

Tears down the test fixture.

Member Data Documentation

◆ _acceptor

Tcp::Acceptor ReactorTest::_acceptor
staticprotected

server socket.

◆ _client

Tcp::Socket ReactorTest::_client
staticprotected

client socket.

◆ _cond

Condition ReactorTest::_cond
staticprotected

condition variable.

◆ _event

std::string ReactorTest::_event
staticprotected

event.

◆ _host

std::string ReactorTest::_host = "127.0.0.1"
staticprotected

host.

◆ _mut

Mutex ReactorTest::_mut
staticprotected

condition mutex.

◆ _port

uint16_t ReactorTest::_port = 5000
staticprotected

port.

◆ _server

Tcp::Socket ReactorTest::_server
staticprotected

server socket.

◆ _timeout

const int ReactorTest::_timeout = 1000
staticprotected

timeout.


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