client.h

00001 #ifndef UTILS_IPC_CLIENT_H
00002 #define UTILS_IPC_CLIENT_H
00003 
00004 #include <string>
00005 #include <stdexcept>
00006 
00011 namespace Utils
00012 {
00017     namespace IPC
00018     {
00019         class PacketCollection;
00023         class Client
00024         {
00025         public:
00030             explicit Client(const std::string& serverName);
00034             ~Client();
00041             void SendRequest(const PacketCollection& packets, unsigned timeout = 1);
00048             void ReadReply(PacketCollection& packets, unsigned timeout = 5);
00049 
00050         private:
00051             const std::string ServerName_;
00052         };
00053 
00057         class ClientError
00058             : public std::runtime_error
00059         {
00060         public:
00065             ClientError(const std::string& message)
00066                 : std::runtime_error(message)
00067             {
00068             }
00069         };
00070     }
00071 }
00072 
00073 #endif//UTILS_IPC_CLIENT_H
 All Classes Namespaces Functions Typedefs

Generated by  doxygen 1.6.2