1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef __HTTPSERVER_HPP_
- #define __HTTPSERVER_HPP_
- #include <iostream>
- #include "UtilBase.hpp"
- #include "Util/logger.h"
- #include <httplib.h>
- #include "config.hpp"
- #include "Expel.hpp"
- using namespace std;
- using namespace toolkit;
- namespace gsd{
- class HttpServer: public ModuleBase
- {
- private:
- HttpServer(): ModuleBase(){
- InfoL;
- }
- public:
- using Ptr = std::shared_ptr<HttpServer>;
- /**
- * @description: CreateNew
- * @return {*}
- */
- static std::shared_ptr<HttpServer> CreateNew();
- ~HttpServer(){}
- /**
- * @description: Init
- * @return {*}
- */
- virtual bool Init();
- /**
- * @description: Destroy
- * @return {*}
- */
- virtual void Destroy();
- protected:
- /**
- * @brief 服务
- */
- std::shared_ptr<httplib::Server> m_server = nullptr;
- };
- }
- #endif
|