中间件底层,websocket

ConfigFile.h 881B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #define CFIGPATH "DingDing.yml"
  3. #include <string>
  4. class CConfigFile
  5. {
  6. public:
  7. static CConfigFile* getInstance() { return &instance; };
  8. bool load();
  9. bool isPush()const { return m_isPush; }
  10. std::string pushUrl()const { return m_url; }
  11. std::string projectName() const { return m_ProjectName; }
  12. std::int32_t heartTimeOut() const { return m_HeartTimeOut; }
  13. std::int32_t heartDelayTime() const { return m_HeartDelayTime; }
  14. private:
  15. CConfigFile();
  16. ~CConfigFile() = default;
  17. CConfigFile(const CConfigFile&) = default;
  18. CConfigFile& operator=(const CConfigFile&) = default;
  19. private:
  20. static CConfigFile instance;
  21. bool m_isPush;
  22. std::string m_url; // 推送地址
  23. std::string m_ProjectName; // 项目名字
  24. int m_HeartTimeOut; // 检测心跳超时时间 ,单位:分钟
  25. int m_HeartDelayTime; // 心跳延迟时间,单位:分钟, 超时推送后,多久再次提醒,0:本次不再提醒
  26. };