chaos.h 346 B

123456789101112131415161718192021222324252627
  1. #ifndef __CHAOS_H_
  2. #define __CHAOS_H_
  3. #include<atomic>
  4. using std::atomic;
  5. class Chaos{
  6. //singleton
  7. public:
  8. static Chaos* getInstance();
  9. private:
  10. Chaos()=default;
  11. static Chaos* instance;
  12. //members
  13. public:
  14. bool udpListen=false;
  15. bool tcpListen=false;
  16. bool programOK=true;
  17. atomic<unsigned>packNum;
  18. int udpsocket;
  19. };
  20. #endif