|
join 1.0
lightweight network framework library
|
Class used to test Proactor. More...


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 std::chrono::milliseconds | _timeout {1000} |
| timeout. | |
| static Condition | _cond |
| condition variable. | |
| static Mutex | _mut |
| condition mutex. | |
| static IoOperation * | _op = nullptr |
| last completed operation. | |
| static IoOperation | _readOp = {} |
| read side operation submitted by the tests. | |
| static IoOperation | _writeOp = {} |
| write side operation submitted by the tests. | |
| static IoOperation | _spareOp = {} |
| spare operation for the tests submitting two operations on the same handle. | |
| static IoOperation | _invalidOp = {} |
| operation on an invalid handle. | |
| static IoOperation | _resubmitOp = {} |
| operation resubmitted from a handler. | |
| static int | _resubmits = 0 |
| number of resubmissions left to perform from a handler. | |
| static int | _resubmitted = 0 |
| result of the resubmission performed from a handler. | |
| static int | _rejected = 0 |
| result of the rejected resubmission performed from a handler. | |
| static Proactor * | _handlerProactor = nullptr |
| proactor driven from within a handler, if any. | |
| static IoOperation * | _cancelTarget = nullptr |
| operation cancelled from within a handler, if any. | |
| static int | _cancelResult = 0 |
| result of the cancellation performed from a handler. | |
| static IoOperation * | _cancelled = nullptr |
| last operation reported as cancelled to the handler. | |
| static bool | _stopFromHandler = false |
| true to stop the proactor from within a handler. | |
| static bool | _suspendFromHandler = false |
| true to suspend the completing operation from within its own handler. | |
| static int | _result = 0 |
| last operation result. | |
| static int | _completions = 0 |
| number of completions received. | |
| 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. | |
| CompletionHandler & | operator= (const CompletionHandler &other)=default |
| copy assignment operator. | |
| CompletionHandler (CompletionHandler &&other)=default | |
| move constructor. | |
| CompletionHandler & | operator= (CompletionHandler &&other)=default |
| move assignment operator. | |
| virtual | ~CompletionHandler ()=default |
| destroy instance. | |
Class used to test Proactor.
|
inlineoverrideprotectedvirtual |
method called when an operation is cancelled.
| op | cancelled operation. |
| result | negative errno. |
Reimplemented from join::CompletionHandler.
|
inlineoverrideprotectedvirtual |
method called when an operation completes.
| op | completed operation. |
| result | bytes transferred or negative errno. |
Reimplemented from join::CompletionHandler.
|
inlineoverrideprotected |
Sets up the test fixture.
|
inlineoverrideprotected |
Tears down the test fixture.
|
staticprotected |
server acceptor.
|
staticprotected |
read buffer.
|
staticprotected |
last operation reported as cancelled to the handler.
|
staticprotected |
result of the cancellation performed from a handler.
|
staticprotected |
operation cancelled from within a handler, if any.
|
staticprotected |
client socket.
|
staticprotected |
number of completions received.
|
staticprotected |
condition variable.
|
staticprotected |
proactor driven from within a handler, if any.
|
staticprotected |
host.
|
staticprotected |
operation on an invalid handle.
|
staticprotected |
condition mutex.
|
staticprotected |
last completed operation.
|
staticprotected |
port.
|
staticprotected |
read side operation submitted by the tests.
|
staticprotected |
result of the rejected resubmission performed from a handler.
|
staticprotected |
operation resubmitted from a handler.
|
staticprotected |
number of resubmissions left to perform from a handler.
|
staticprotected |
result of the resubmission performed from a handler.
|
staticprotected |
last operation result.
|
staticprotected |
server socket.
|
staticprotected |
spare operation for the tests submitting two operations on the same handle.
|
staticprotected |
true to stop the proactor from within a handler.
|
staticprotected |
true to suspend the completing operation from within its own handler.
|
staticprotected |
timeout.
|
staticprotected |
write side operation submitted by the tests.