msglogon.h

来自「网络游戏通用架构, 这是基于boost和libevent写的一个程序」· C头文件 代码 · 共 39 行

H
39
字号
#ifndef MSGLOGON_H
#define MSGLOGON_H

#include <string>

using namespace std;

#include "socket_api.h"
#include "message.h"
#include "client.h"

class MsgLogon : public Message
{
public:
    MsgLogon();
    MsgLogon( string __name, string __password );
    ~MsgLogon();
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 _password;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?