#ifndef _ZA_ACSSERVERPROC #define _ZA_ACSSERVERPROC #include #include #include "thirdparty/json.h" #include "ZJ_ACSputRdb.h" typedef unsigned long long uint64_netmo; //typedef unsigned int uint32; //返回客户端结果类型 enum ResultType{ RESPONSE_ERROR_DATAFORMAT = 0, //请求数据格式错误 RESPONSE_SUCCESS = 200, //请求成功 RESPONSE_FAILED = 404, //请求失败 RESPONSE_ERROR_UNKNOWN }; class RestfulServer { public: RestfulServer() {} ~RestfulServer() {} bool Start(const std::string &port, void *); bool Close(); // 关闭 //private: // static void ev_handler(struct mg_connection *nc, int ev, void *ev_data); // // struct mg_mgr m_mgr; // struct mg_connection *m_nc; // struct mg_bind_opts m_bind_opts; }; #endif