/* ==================================================================== * ÆÄ ÀÏ : AgentUdpSend.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : °ûöÁß * ÀÛ ¼º ÀÏ : 09/07/09 * ÁÖÀÇ»çÇ× : * =================================================================== */ #ifndef __AGENT_UDP_SEND_H__ #define __AGENT_UDP_SEND_H__ //#ifndef WINVER //#define WINVER 0x0500 //#endif // //#ifndef _WIN32_WINNT //#define _WIN32_WINNT 0x0500 //#endif #pragma once #include "iocpudpsend.h" #include "serverprotocol.h" #include #include "logprotocol.h" class AgentUdpSend : public cIocpUdpSend { private: SOCKADDR_IN mLogin; u_long mLoginSeq; IoContextBuffer* mLoginBuffer; SOCKADDR_IN mGame; u_long mGameSeq; IoContextBuffer* mGameBuffer; SOCKADDR_IN mLog; u_long mLogSeq; IoContextBuffer* mLogBuffer; private: bool SendComplete ( ULONG_PTR completionKey, PerIoContext* perIoContext, DWORD bytesTransferred ); private: MSGBUF* GetPacket ( void** handle, char tos, char protocol, SOCKADDR_IN addr, u_long& seq ); bool SendPacket ( void* handle, u_long length ); public: // Ŭ·¡½º »ý¼º ¹× °ø¿ë ¸Þ¼Òµå. AgentUdpSend(void); bool Initialize ( char* addr, unsigned short numWorkerThreads=2, unsigned int bufferLength=65535 ); void Shutdown ( DWORD maxWait=INFINITE ); bool PostServerEvent ( char* message ); public: // Ŭ·¡½º ÆÄ±« ¸Þ¼Òµå. virtual ~AgentUdpSend(void); }; #endif // __AGENT_UDP_SEND_H__