#pragma once #include #include #include "Define.h" class CNetPacketParser { public: typedef DWORD (*LPFN_PACKET_NOTIFY_PROC) ( LPVOID, // ¼¼¼Ç SHORT, // ÆÐŶ ÁÖÄÚµå SHORT, // ÆÐŶ º¸Á¶ÄÚµå LPBYTE, // ¹öÆÛ Æ÷ÀÎÅÍ SHORT // ÆÐŶ Å©±â ); private: LPFN_PACKET_NOTIFY_PROC m_lpfnPacketNotifyProc; public: CNetPacketParser(); virtual ~CNetPacketParser(); VOID SetPacketNotifyProc(LPFN_PACKET_NOTIFY_PROC lpfnPacketNotifyProc) { m_lpfnPacketNotifyProc = lpfnPacketNotifyProc; } static BOOL PacketParse(class CSessionBase* lpSession, CHAR* lpcBuffer, INT& iBufferPtr, UINT uIoBytes, UINT uTotalBufferSize, LPVOID lpRecvNotifyProcParam, IN_ADDR stIpAddress, WORD wPortNumber); public: LPFN_PACKET_NOTIFY_PROC GetNotifyProc() const { return m_lpfnPacketNotifyProc; } };