DragonNest/Server/ServiceMonitorEx/Source/NetPacketParser.h
2024-12-20 16:56:44 +08:00

39 lines
1.6 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


#pragma once
#include <windows.h>
#include <winsock2.h>
#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; }
};