web_connect.h 715 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef WEB_CONNECT_H
  2. #define WEB_CONNECT_H
  3. #include<atomic>
  4. #include<vector>
  5. #include<string>
  6. #include<memory>
  7. #include"sio_message.h"
  8. #include"wsClient.h"
  9. class web_connect
  10. {
  11. public:
  12. web_connect();
  13. static void init(const std::vector<std::string>&uri_list,int32_t st, std::map<std::string, sys::MSG_HANDLE_FUNC_TYPE>& MsgFuncList);
  14. static void start_beatheart_monitor();
  15. static bool connect();
  16. static void close();
  17. private:
  18. //static void _beatheart_callback( int ID, std::string const& name,sio::message::ptr const& data, bool need_ack, sio::message::list &ack_resp );
  19. static void _beatheart_thread();
  20. //static std::atomic<int> _beatheart_count;
  21. };
  22. #endif // WEB_CONNECT_H