/* ==================================================================== * ÆÄ ÀÏ : recver.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : °ûöÁß * ÀÛ ¼º ÀÏ : 07/02/14 * ÁÖÀÇ»çÇ× : * =================================================================== */ #ifndef __RECVER_H__ #define __RECVER_H__ //#ifndef WINVER //#define WINVER 0x0500 //#endif // //#ifndef _WIN32_WINNT //#define _WIN32_WINNT 0x0500 //#endif #pragma once #include "iocpudprecv.h" #include "serverProtocol.h" #include "logprotocol.h" #include "packetpool.h" class cRecver : public IocpUdpRecv { private: PacketPool* mPacketPool; private: // LOG °ü·Ã ¸Þ¼Òµå. bool PostServerEvent ( LPCTSTR format, ... ); private: // ¼­¹ö °ü·Ã ¸Þ¼Òµå - º¸Á¶. bool BatchComplete ( MSGBUF* msgBuf, int msgLen ); private: // ¼­¹ö °ü·Ã ¸Þ¼Òµå - ÁÖ. bool RecvComplete ( ULONG_PTR completionKey, PerIoContext* perIoContext, DWORD bytesTransferred ); public: // Ŭ·¡½º »ý¼º ¹× °ø¿ë ¸Þ¼Òµå. cRecver(void); bool Initialize ( char* ipAddr="", unsigned short port=14700, unsigned short numWorkerThreads=2, unsigned int bufferLength=65535 ); void Shutdown ( DWORD maxWait=INFINITE ); DWORD BackendThread ( ); public: // Ŭ·¡½º ÆÄ±« ¸Þ¼Òµå. virtual ~cRecver(void); }; #endif // __RECVER_H__