#ifndef _M2_CHECK_SERVER_KEY_H_ #define _M2_CHECK_SERVER_KEY_H_ #include #include #include "CheckServerKey.h" class CheckServer { public: static FORCEINLINE void AddServerKey(const char* serverKey) { keys_.push_back(serverKey); } static FORCEINLINE bool CheckIp(const char* ip) { // µðÆÄÀÎ ¾È°É¸®¸é üũ ¾ÈÇÔ #ifndef _USE_SERVER_KEY_ fail_ = false; return true; #endif for (int i = 0; i < keys_.size(); i++) { // Çϳª¶óµµ ¸Â´Â ¼­¹ö۰¡ ÀÖÀ¸¸é ok std::string errorString; if (CheckServerKey(keys_[i].c_str(), ip, "", errorString)) { fail_ = false; break; } } return !IsFail(); } static FORCEINLINE bool IsFail() { return fail_; } private: static std::vector keys_; static bool fail_; }; #endif // #ifndef _M2_CHECK_SERVER_KEY_H_