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.
 
 
 
 
 
 

28 lines
775 B

  1. #ifndef CPPCMS_SESSION_TCP_STORAGE_H
  2. #define CPPCMS_SESSION_TCP_STORAGE_H
  3. #include "session_storage.h"
  4. #include "tcp_connector.h"
  5. #include "session_backend_factory.h"
  6. namespace cppcms {
  7. class cppcms_config;
  8. class session_tcp_storage : public session_server_storage , public tcp_connector {
  9. protected:
  10. virtual unsigned hash(std::string const &key);
  11. public:
  12. session_tcp_storage(std::vector<std::string> const &ips,std::vector<int> const &ports) :
  13. tcp_connector(ips,ports)
  14. {
  15. }
  16. static session_backend_factory factory(cppcms_config const &);
  17. virtual void save(std::string const &sid,time_t timeout,std::string const &in);
  18. virtual bool load(std::string const &sid,time_t *timeout,std::string &out);
  19. virtual void remove(std::string const &sid);
  20. };
  21. } // cppcms
  22. #endif