(C++) WtServerPusherClient

January 25, 2018 · View on GitHub

 

 

 

 

 

(C++) WtServerPusherClient

 

 

 

 

 

 

Technical facts

 

Application type(s)

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

  • Boost Boost: version 1.42
  • STL STL: GNU ISO C++ Library, version 4.5.2
  • Wt Wt: version 3.1.9

 

 

 

 

 

wtserverpusherclient.cpp

 


 

 

 

 

 

wtserverpusherclient.h

 


//--------------------------------------------------------------------------- #ifndef WTSERVERPUSHERCLIENT_H #define WTSERVERPUSHERCLIENT_H //--------------------------------------------------------------------------- #include <string> #include <vector> //--------------------------------------------------------------------------- ///WtServerPusherClient is a client responding to WtServerPusher ///and to be used as a base class struct WtServerPusherClient {   virtual ~WtServerPusherClient();   ///Get the version of this class   static const std::string GetVersion();   ///Get the version history of this class   static const std::vector<std::string> GetVersionHistory();   ///OnServerPush is called when the WtServerPusher is posted to   virtual void OnServerPush() = 0;   protected:   ///WtServerPusherClient constructor is protected   ///because it is to be used as a base class   WtServerPusherClient();   private:   ///Respond to the server   void OnServer(); }; //--------------------------------------------------------------------------- #endif // WTSERVERPUSHERCLIENT_H