📄 ggcommand.cpp
字号:
//////////////////////////////////////////////////////////////////////// // Filename : GGCommand.cpp // Written By : reiot@ewestsoft.com// Description : // //////////////////////////////////////////////////////////////////////// include files#include "GGCommand.h"//////////////////////////////////////////////////////////////////////// Datagram 按眉肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////void GGCommand::read ( Datagram & iDatagram ) throw ( ProtocolException , Error ){ __BEGIN_TRY //-------------------------------------------------- // read command //-------------------------------------------------- BYTE szCommand; iDatagram.read( szCommand ); if ( szCommand == 0 ) throw InvalidProtocolException("szCommand == 0"); if ( szCommand > 80 ) throw InvalidProtocolException("too long Command length"); iDatagram.read( m_Command , szCommand ); __END_CATCH} //////////////////////////////////////////////////////////////////////// Datagram 按眉肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////void GGCommand::write ( Datagram & oDatagram ) const throw ( ProtocolException , Error ){ __BEGIN_TRY //-------------------------------------------------- // write client IP //-------------------------------------------------- BYTE szCommand = m_Command.size(); if ( szCommand == 0 ) throw InvalidProtocolException("szCommand == 0"); if ( szCommand > 80 ) throw InvalidProtocolException("too long Command length"); oDatagram.write( szCommand ); oDatagram.write( m_Command ); __END_CATCH}//////////////////////////////////////////////////////////////////////// execute packet's handler//////////////////////////////////////////////////////////////////////void GGCommand::execute ( Player * pPlayer ) throw ( ProtocolException , Error ){ __BEGIN_TRY GGCommandHandler::execute( this ); __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string GGCommand::toString () const throw (){ StringStream msg; msg << "GGCommand(" << m_Command << ")"; return msg.toString();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -