📄 sbillingplayer.h
字号:
///////////////////////////////////////////////////////////////////////// filename : SBillingPlayer.h///////////////////////////////////////////////////////////////////////#ifndef __SBILLING_PLAYER__#define __SBILLING_PLAYER__// include file#include "Types.h"#include "Exception.h"#include "Player.h"// forward declarationclass PayUser;class Packet;class CBillingPacketHeader;class CBillingPacketErrorBody;class CBillingPacketResponseIntervalValidationBody;class CBillingPacketResponseLoginBody;class CBillingPacketResponseMinusPointBody;class CBillingPacketResponseMinusMinuteBody;class CBillingPacketResponseLogoutBody;/////////////////////////////////////////////// class SBillingPlayer/////////////////////////////////////////////class SBillingPlayer : public Player{public: // constructor & destructor SBillingPlayer() throw ( Error ); SBillingPlayer( Socket* pSocket ) throw ( Error ); virtual ~SBillingPlayer() throw ( Error );public: // network read / write 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 ); void setSocket( Socket* pSocket ) throw (); // get debug string virtual string toString() const throw ( Error );public: void sendIntervalValidation() throw ( ProtocolException, Error ); void sendLogin( PayUser* pPayUser ) throw ( ProtocolException, Error ); void sendMinusPoint( PayUser* pPayUser ) throw ( ProtocolException, Error ); void sendMinusMinute( PayUser* pPayUser ) throw ( ProtocolException, Error ); void sendLogout( PayUser* pPayUser ) throw ( ProtocolException, Error );public: // 菩哦 贸府侩 窃荐甸 void executeError( CBillingPacketHeader& header, CBillingPacketErrorBody& body ) throw ( IOException, Error ); void executeIntervalValidation( CBillingPacketHeader& header, CBillingPacketResponseIntervalValidationBody& body ) throw ( IOException, Error ); void executeLogin( CBillingPacketHeader& header, CBillingPacketResponseLoginBody& body ) throw ( IOException, Error ); void executeMinusPoint( CBillingPacketHeader& header, CBillingPacketResponseMinusPointBody& body ) throw ( IOException, Error ); void executeMinusMinute( CBillingPacketHeader& header, CBillingPacketResponseMinusMinuteBody& body ) throw ( IOException, Error ); void executeLogout( CBillingPacketHeader& header, CBillingPacketResponseLogoutBody& body ) throw ( IOException, Error );public:};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -