#ifndef WEBFUN_H #define WEBFUN_H #ifdef _WIN32 #ifdef HTTPLIBEXPORTS #define WEBFUN_API __declspec(dllexport) #else #define WEBFUN_API __declspec(dllimport) #ifdef _DEBUG #pragma comment (lib, "httplibd.lib") #else #pragma comment (lib, "httplib.lib") #endif #endif #else #define WEBFUN_API #endif #include #include #include #include #include namespace weblib { struct httpinfo { std::string strurl{}; std::string strtarget{}; std::string strjson{}; std::string stronly{}; std::map addheadinfo{}; std::set setresult_int{}; }; WEBFUN_API inline void* webini(int iport = 0, bool blog = true); WEBFUN_API inline void webrun(void* pweb); WEBFUN_API inline void delweb(void* pweb); WEBFUN_API inline void addmsg(void* pweb, boost::any thttp); WEBFUN_API inline void* httpini(); WEBFUN_API inline void delhttp(void* phttp); WEBFUN_API inline void addhttpmsg(void* phttp, boost::any thttp); WEBFUN_API inline void sendhttp(void* phttp, httpinfo&& thttpinfo, std::function &&dofun = nullptr); } #endif // WEBSOCKET_HPP