gameserverplayer.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 80 行
H
80 行
//////////////////////////////////////////////////////////////////////// // Filename : GameServerPlayer.h // Written by : reiot@ewestsoft.com// Description :// //////////////////////////////////////////////////////////////////////#ifndef __GAME_SERVER_PLAYER_H__#define __GAME_SERVER_PLAYER_H__// include files#include "Types.h"#include "Exception.h"#include "Player.h"////////////////////////////////////////////////////////////////////////// class GameServerPlayer////////////////////////////////////////////////////////////////////////class GameServerPlayer : public Player {public : // constructor GameServerPlayer () throw (Error); GameServerPlayer (Socket * pSocket) throw ( Error ); // destructor virtual ~GameServerPlayer () throw (Error); virtual void processInput () throw (IOException, Error); virtual void processOutput () throw (IOException, Error); // parse packet and execute handler for the packet virtual void processCommand () throw (IOException, Error); // send packet to player's output buffer virtual void sendPacket (Packet* pPacket) throw (ProtocolException, Error); // disconnect // 敲饭捞绢狼 楷搬阑 辆丰且 锭, 惑措祈捞 利例窍霸 肺弊酒眶窍瘤 臼阑 版快 家南狼 楷搬捞 // 捞固 谗败 乐栏骨肺 disconnect(DISCONNECTED) 甫 荤侩秦辑 楷搬阑 辆丰秦具 茄促. 馆搁, // 沥寸窍霸 肺弊酒眶阑 茄 版快俊绰 disconnect(UNDISCONNECTED) 甫 荤侩秦具 茄促. virtual void disconnect (bool bDisconnected = DISCONNECTED) throw (InvalidProtocolException, Error); // get/set socket //Socket* getSocket () throw () { return m_pSocket; } void setSocket (Socket* pSocket) throw (); // get/set player ID //string getID () const throw () { return m_ID; } //void setID (const string & id) throw () { m_ID = id; } // get debug string virtual string toString () const throw (Error); protected : /* // player id string m_ID; // TCP client socket Socket* m_pSocket; // buffered socket input stream SocketInputStream* m_pInputStream; // buffered socket output stream SocketOutputStream* m_pOutputStream; */};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?