#pragma once #include #include #include #include using namespace std; #pragma comment(lib,"libyaml-cppmd-mt.lib") #define YAMLCONFIGFILEPATH "HttpServer.yml" class YamlConfig :public boost::noncopyable { public: YamlConfig(); ~YamlConfig(); static YamlConfig* GetInstance() { return &sp; }; auto GetWsServerIP()const { return wsServerIP; } auto GetWsServerPort()const { return wsServerPort; } auto GetAcdIP() const { return acdIP; }; auto GetAcdPort() const { return acdPort; }; auto GetHttpServerIP() const { return httpIP; }; auto GetHttpServerPort() const { return httpPort; }; std::string GetWssSSLFilePath()const { return sslFilePath; } std::string GetWssPwd() const { return sslPwd; } int GetWssPort() const { return wssPort; } private: static YamlConfig sp; private: std::string wsServerIP; int wsServerPort; std::string acdIP; int acdPort; string httpIP; int httpPort; int wssPort; std::string sslFilePath; std::string sslPwd; };