msgchat.h
来自「网络游戏通用架构, 这是基于boost和libevent写的一个程序」· C头文件 代码 · 共 44 行
H
44 行
#ifndef MSGCHAT_H
#define MSGCHAT_H
#include <stddef.h>
#include <string.h>
#include <sstream>
#include <iostream>
using namespace std;
#include "socket_api.h"
#include "message.h"
#include "client.h"
class MsgChat : public Message
{
public:
MsgChat();
MsgChat( const string& __msg );
~MsgChat();
public:
static int* getTypePtr(void)
{
return &_type;
}
int getType(void) const
{
return _type;
}
int value_size(void);
bool load( Buffer& __buffer );//return true for successed
bool save( Buffer& __buffer ) const;//return true for successed
bool preProcess( Connection* __conn, Remote* __remote, World* __world, shared_ptr<Message>& __this );//return true to be queued
bool process( shared_ptr<Message>& __this );//return true to be removed from the queue
protected:
static int _type;
string _name;
string _msg;
Client* _client;
World* _world;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?