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.
 
 
 
 
 
 

30 lines
973 B

  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_MESSENGER_H
  9. #define CPPCMS_TCP_MESSENGER_H
  10. #include <booster/aio/socket.h>
  11. #include <booster/noncopyable.h>
  12. #include "tcp_cache_protocol.h"
  13. namespace cppcms {
  14. namespace impl {
  15. class messenger : public booster::noncopyable {
  16. booster::aio::stream_socket socket_;
  17. std::string ip_;
  18. int port_;
  19. public:
  20. void connect(std::string ip,int port);
  21. messenger(std::string ip,int port);
  22. messenger();
  23. void transmit(tcp_operation_header &h,std::string &data);
  24. };
  25. } // impl
  26. } // cppcms
  27. #endif