ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
  4. //
  5. // See accompanying file COPYING.TXT file for licensing details.
  6. //
  7. ///////////////////////////////////////////////////////////////////////////////
  8. #ifndef CPPCMS_TCP_CONNECTOR_H
  9. #define CPPCMS_TCP_CONNECTOR_H
  10. #include <string>
  11. #include <vector>
  12. #include <booster/noncopyable.h>
  13. namespace cppcms {
  14. namespace impl {
  15. class messenger;
  16. struct tcp_operation_header;
  17. class tcp_connector : private booster::noncopyable
  18. {
  19. public:
  20. messenger &get(std::string const &key);
  21. tcp_connector(std::vector<std::string> const &ip_list,std::vector<int> const &port_list);
  22. virtual ~tcp_connector();
  23. void broadcast(tcp_operation_header &h,std::string &data);
  24. protected:
  25. messenger *tcp;
  26. int conns;
  27. virtual unsigned hash(std::string const &key);
  28. };
  29. } // impl
  30. } // cppcms
  31. #endif