📄 queueserviceevent.h
字号:
// ***************************************************************
// QueueServiceEvent version: 1.0
// -------------------------------------------------------------
// File Name: QueueServiceEvent.h
// Created: 2007/07/18
// Modified: 2007/07/18 16:43
// Author: William.Liang
// Msn: lwq49@msn.com
// Email: lwq49@21cn.com, lwq49@msn.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is William.Liang .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef QUEUE_SERVICE_EVENT_HEAD_FILE
#define QUEUE_SERVICE_EVENT_HEAD_FILE
#pragma once
#include "ServiceEnginer.h"
//////////////////////////////////////////////////////////////////////////
//数据队列事件
class SERVICE_ENGINER_CLASS CQueueServiceEvent
{
//变量定义
public:
IQueueService* m_pIQueueService; //队列接口
BYTE m_cbBuffer[MAX_QUEUE_PACKET]; //接收缓冲
//函数定义
public:
//构造函数
CQueueServiceEvent();
//析构函数
virtual ~CQueueServiceEvent();
//管理函数
public:
//设置接口
bool SetQueueService(IUnknownEx * pIUnknownEx);
//获取接口
void * GetQueueService(const IID & Guid, DWORD dwQueryVer);
//是否有效
bool IsValid();
//通知函数
public:
//定时器事件
bool PostTimerEvent(WORD wTimerID, WPARAM wBindParam);
//动作事件
bool PostActionEvent(IGameObject* pIGameObject, WORD wActionID, DWORD dwRepeatTimes, WPARAM wBindParam);
//数据库事件
bool PostDataBaseEvent(WORD wRequestID, WORD wIndex, WORD wRoundID, const void * pDataBuffer, WORD wDataSize);
//网络应答事件
bool PostSocketAcceptEvent(WORD wIndex, WORD wRoundID, DWORD dwClientIP);
//网络读取事件
bool PostSocketReadEvent(WORD wIndex, WORD wRoundID, CMD_Command Command, const void * pDataBuffer, WORD wDataSize);
//网络关闭事件
bool PostSocketCloseEvent(WORD wIndex, WORD wRoundID, DWORD dwClientIP, DWORD dwConnectSecond);
//客户端网络
public:
//网络连接事件
bool PostSocketConnectEvent(int iErrorCode, LPCTSTR szErrorDesc);
//网络读取事件
bool PostSocketReadEvent(CMD_Command Command, const void * pDataBuffer, WORD wDataSize);
//网络关闭事件
bool PostSocketCloseEvent();
};
//////////////////////////////////////////////////////////////////////////
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -