📄 glincomingconnection.h
字号:
//----------------------------------------------------------------------// // Filename : GLIncomingConnection.h // Written By : Reiot// Description : // //----------------------------------------------------------------------#ifndef __GL_INCOMING_CONNECTION_H__#define __GL_INCOMING_CONNECTION_H__// include files#include "DatagramPacket.h"#include "PacketFactory.h"//----------------------------------------------------------------------//// class GLIncomingConnection;//// 肺弊牢 辑滚俊辑 荤侩磊啊 霸烙 辑滚肺 立加窍妨绊 且 锭, 肺弊牢 辑滚绰// 弊 霸烙 辑滚俊霸 绢恫 林家俊辑 绢恫 荤侩磊啊 绢恫 农府贸肺 肺弊牢且// 巴捞促.. 扼绊 舅妨林绰 菩哦捞促.//// *CAUTION*//// 被捞 农府贸 捞抚捞 鞘夸茄啊? 窍绰 狼巩捞 乐阑 荐 乐摆绰单, 促澜苞 鞍篮// 版快甫 绊妨沁阑锭 鞘夸窍霸 等促. 肺弊牢 辑滚肺何磐 Slot3 某腐磐甫 急琶// 秦初绊, 角力肺 霸烙 辑滚俊 立加秦辑绰 SLOT2 某腐磐甫 肺爹秦崔扼绊 且// 荐啊 乐绰 巴捞促. 捞甫 阜扁 困秦辑, CLSelectPC肺 急琶茄 某腐磐甫 // 霸烙 辑滚俊霸 舅妨拎具 窍哥, CGConnect 俊辑档 某腐磐 酒捞叼甫 器窃秦辑// 官肺 肺爹窍档废 秦具 茄促.////----------------------------------------------------------------------class GLIncomingConnection : public DatagramPacket {public : // Datagram 按眉俊辑何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促. void read(Datagram & iDatagram) throw(ProtocolException, Error); // Datagram 按眉肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促. void write(Datagram & oDatagram) const throw(ProtocolException, Error); // execute packet's handler void execute(Player* pPlayer) throw(ProtocolException, Error); // get packet id PacketID_t getPacketID() const throw() { return PACKET_GL_INCOMING_CONNECTION; } // get packet's body size PacketSize_t getPacketSize() const throw() { return + szBYTE + m_PlayerID.size() // Player ID + szBYTE + m_ClientIP.size(); // client ip } // get packet name string getPacketName() const throw() { return "GLIncomingConnection"; } // get packet's debug string string toString() const throw();public : // get/set playerID const string& getPlayerID() const throw() { return m_PlayerID; } void setPlayerID(const string& playerID) throw() { m_PlayerID = playerID; } // get/set client ip const string& getClientIP() const throw() { return m_ClientIP; } void setClientIP(const string& ip) throw() { m_ClientIP = ip; } private : // Player ID string m_PlayerID; // 努扼捞攫飘狼 IP string m_ClientIP;};////////////////////////////////////////////////////////////////////////// class GLIncomingConnectionFactory;//// Factory for GLIncomingConnection////////////////////////////////////////////////////////////////////////class GLIncomingConnectionFactory : public PacketFactory {public : // create packet Packet* createPacket() throw() { return new GLIncomingConnection(); } // get packet name string getPacketName() const throw() { return "GLIncomingConnection"; } // get packet id PacketID_t getPacketID() const throw() { return Packet::PACKET_GL_INCOMING_CONNECTION; } // get packet's max body size // *OPTIMIZATION HINT* // const static GLIncomingConnectionPacketMaxSize 甫 沥狼, 府畔窍扼. PacketSize_t getPacketMaxSize() const throw() { return + szBYTE + 20 // creature name + szBYTE + 15; // client ip }};////////////////////////////////////////////////////////////////////////// class GLIncomingConnectionHandler;////////////////////////////////////////////////////////////////////////class GLIncomingConnectionHandler { public : // execute packet's handler static void execute(GLIncomingConnection* pPacket) throw(ProtocolException, Error);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -