Sese Framework
2.3.0
A cross-platform framework
|
#include <TimerableService_V2.h>
Public Member Functions | |
void | dispatch (uint32_t timeout) override |
virtual void | onTimeout (v2::TimeoutEvent *event) |
v2::TimeoutEvent * | setTimeoutEvent (int64_t seconds, void *data) |
void | cancelTimeoutEvent (v2::TimeoutEvent *event) |
Private Attributes | |
TimeWheel | timeWheel {} |
Time wheel. | |
Timerable Service.
void TimerableService::cancelTimeoutEvent | ( | v2::TimeoutEvent * | event | ) |
Cancel and free the timeout event
event | Timeout event |
References sese::TimeWheel::cancel(), sese::service::v2::TimeoutEvent::event, and timeWheel.
Referenced by sese::iocp::v1::IOCPServer::cancelTimeout(), sese::iocp::v1::IOCPService::releaseContext(), sese::iocp::v1::IOCPServer::setTimeout(), and sese::iocp::v1::IOCPService::~IOCPService().
|
override |
Dispatch events
timeout | Timeout duration |
References sese::TimeWheel::check(), and timeWheel.
|
virtual |
Timeout callback function
event | Event |
Reimplemented in sese::iocp::v1::IOCPService.
Referenced by setTimeoutEvent().
TimeoutEvent * TimerableService::setTimeoutEvent | ( | int64_t | seconds, |
void * | data ) |
Set a timeout event
seconds | Timeout duration |
data | Additional data |
References sese::TimeWheel::delay(), sese::service::v2::TimeoutEvent::event, onTimeout(), and timeWheel.
Referenced by sese::iocp::v1::IOCPServer::setTimeout().
|
private |
Time wheel.
Referenced by cancelTimeoutEvent(), dispatch(), and setTimeoutEvent().