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

Class used to test HybridProactor. More...

Inheritance diagram for HybridProactorTest:
Collaboration diagram for HybridProactorTest:

Protected Member Functions

void SetUp () override
 Sets up the test fixture.
 
void TearDown () override
 Tears down the test fixture.
 
void onComplete (IoOperation *op, int result) override
 method called when an operation completes.
 
void onCancel (IoOperation *op, int result) override
 method called when an operation is cancelled.
 
- Protected Member Functions inherited from join::CompletionHandler

Static Protected Attributes

static Tcp::Acceptor _acceptor
 server acceptor.
 
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 = 5001
 port.
 
static const int _timeout = 1000
 timeout.
 
static Condition _cond
 condition variable.
 
static Mutex _mut
 condition mutex.
 
static IoOperation_op = nullptr
 last completed operation.
 
static int _result = 0
 last operation result.
 
static char _buf [256] = {}
 read buffer.
 

Additional Inherited Members

- Public Member Functions inherited from join::CompletionHandler
 CompletionHandler ()=default
 create instance.
 
 CompletionHandler (const CompletionHandler &other)=default
 copy constructor.
 
CompletionHandleroperator= (const CompletionHandler &other)=default
 copy assignment operator.
 
 CompletionHandler (CompletionHandler &&other)=default
 move constructor.
 
CompletionHandleroperator= (CompletionHandler &&other)=default
 move assignment operator.
 
virtual ~CompletionHandler ()=default
 destroy instance.
 

Detailed Description

Class used to test HybridProactor.

Member Function Documentation

◆ onCancel()

void HybridProactorTest::onCancel ( IoOperation * op,
int result )
inlineoverrideprotectedvirtual

method called when an operation is cancelled.

Parameters
opcancelled operation.
resultnegative errno.

Reimplemented from join::CompletionHandler.

◆ onComplete()

void HybridProactorTest::onComplete ( IoOperation * op,
int result )
inlineoverrideprotectedvirtual

method called when an operation completes.

Parameters
opcompleted operation.
resultbytes transferred or negative errno.

Reimplemented from join::CompletionHandler.

◆ SetUp()

void HybridProactorTest::SetUp ( )
inlineoverrideprotected

Sets up the test fixture.

◆ TearDown()

void HybridProactorTest::TearDown ( )
inlineoverrideprotected

Tears down the test fixture.

Member Data Documentation

◆ _acceptor

Tcp::Acceptor HybridProactorTest::_acceptor
staticprotected

server acceptor.

◆ _buf

char HybridProactorTest::_buf = {}
staticprotected

read buffer.

◆ _client

Tcp::Socket HybridProactorTest::_client
staticprotected

client socket.

◆ _cond

Condition HybridProactorTest::_cond
staticprotected

condition variable.

◆ _host

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

host.

◆ _mut

Mutex HybridProactorTest::_mut
staticprotected

condition mutex.

◆ _op

IoOperation * HybridProactorTest::_op = nullptr
staticprotected

last completed operation.

◆ _port

uint16_t HybridProactorTest::_port = 5001
staticprotected

port.

◆ _result

int HybridProactorTest::_result = 0
staticprotected

last operation result.

◆ _server

Tcp::Socket HybridProactorTest::_server
staticprotected

server socket.

◆ _timeout

const int HybridProactorTest::_timeout = 1000
staticprotected

timeout.


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