1
0

net-service.h 687 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __net_service_hpp__
  2. #define __net_service_hpp__
  3. #include <znet.h>
  4. #include <zstream.h>
  5. struct client;
  6. struct worker;
  7. struct tdoa_sync;
  8. struct net_service:service_callback
  9. {
  10. worker* m_loc_worker;
  11. tdoa_sync*m_sync_worker;
  12. net_service();
  13. ~net_service();
  14. void on_message(const std::shared_ptr<client> &clt,const char*data,size_t len);
  15. void on_timer();
  16. void on_connect(const std::shared_ptr<client> &clt);
  17. int32_t parse_data_anchor(const std::shared_ptr<client>& clt, zistream& s);
  18. int32_t parse_data_anchor_opt(const std::shared_ptr<client>& clt, zistream& s);
  19. void parse_data_card();
  20. float get_pdoa(float poa[], const double& offset);
  21. };
  22. #endif