acl/lib_acl_cpp/samples/winaio/winaioDlg.h

64 lines
1.3 KiB
C
Raw Normal View History

// winaioDlg.h : ͷ<>ļ<EFBFBD>
2014-11-19 00:25:21 +08:00
//
#pragma once
#include <list>
#include "resource.h"
#include "AioServer.h"
#include "AioClient.h"
class CAioTimer;
class acl::aio_handle;
class acl::aio_listen_stream;
// CwinaioDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
2014-11-19 00:25:21 +08:00
class CwinaioDlg : public CDialog
{
// <20><><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
public:
CwinaioDlg(CWnd* pParent = NULL); // <20><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><ECBAAF>
2014-11-19 00:25:21 +08:00
~CwinaioDlg();
// <20>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
enum { IDD = IDD_WINAIO_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<><D6A7>
2014-11-19 00:25:21 +08:00
// ʵ<><CAB5>
2014-11-19 00:25:21 +08:00
protected:
HICON m_hIcon;
// <20><><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ϣӳ<CFA2><EFBFBD><E4BAAF>
2014-11-19 00:25:21 +08:00
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedListen();
afx_msg void OnBnClickedConnect();
afx_msg void OnBnClickedSetTimer();
afx_msg void OnBnClickedDelTimer();
protected:
// acl::aio_handle <20><><EFBFBD><EFBFBD><E9BAAF>
2014-11-19 00:25:21 +08:00
void on_increase();
void on_decrease();
private:
CServerCallback callback_;
acl::aio_handle* handle_;
acl::aio_listen_stream* sstream_;
bool keep_timer_;
IO_CTX client_ctx_;
void InitCtx();
public:
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedButtonKeepTimer();
afx_msg void OnBnClickedButtonNoKeepTimer();
afx_msg void OnBnClickedButtonMemtest();
private:
std::list<CAioTimer*> timers_;
public:
};