timer_handler.h
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 52 行
H
52 行
// -*- C++ -*-
// =========================================================================
/**
* @file Timer_Handler.h
*
* Timer_Handler.h,v 1.2 2002/10/19 06:54:50 mayur Exp
*
* @desc Fires servant upcall after a specified period of delay
*
* @author Mayur Deshpande <mayur@ics.uci.edu>
*
*/
// =========================================================================
#ifndef TIMER_HANDLER_H
#define TIMER_HANDLER_H
#include "ace/Timer_Queue.h"
#include "TestS.h"
// @@ Mayur, please do not program like a Java programmer. Please
// move the class declaration to a separate header file, and keep
// the implementation code in this file.
//
// Mayur: Okie. I thought it would be easier if everything was
// present in a single file because this class is small. Of course,
// if this class grows big (which shouldn't happen), that might be a
// problem.
class Timer_Handler : public ACE_Event_Handler
{
public:
Timer_Handler (Test::AMH_RoundtripResponseHandler_ptr rh,
Test::Timestamp send_time);
virtual int handle_timeout (const ACE_Time_Value &,
const void *);
virtual int handle_close (ACE_HANDLE handle,
ACE_Reactor_Mask mask);
private:
// Store the RH and the parameter that we send back to the client.
// We create one Timer_Handler instance for each RH.
Test::AMH_RoundtripResponseHandler_var rh_;
Test::Timestamp send_time_;
};
#endif /* TIMER_HANDLER_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?