CARMA C++
FastPdbServer.h
Go to the documentation of this file.
1 // $Id: FastPdbServer.h,v 1.1 2014/05/05 22:51:57 eml Exp $
2 
3 #ifndef SZA_UTIL_FASTPDBSERVER_H
4 #define SZA_UTIL_FASTPDBSERVER_H
5 
15 #include "carma/szautil/FastPdb.h"
17 #include "carma/szautil/Server.h"
18 
19 #define REG_DATA_FN(fn) void (fn)(unsigned nByte, unsigned nEl, unsigned char* src, unsigned char* dest)
20 
21 namespace sza {
22  namespace util {
23 
24  class NetMonitorFrame;
25 
26  class FastPdbServer : public sza::util::Server {
27  public:
28 
29  //------------------------------------------------------------
30  // A class for maintaining per-client data
31  //------------------------------------------------------------
32 
33  class ClientData :
34  public Server::ServerData
35  {
36  public:
37 
38  ClientData() {};
39  virtual ~ClientData();
40 
41  FastPdbData clientData_;
42 
43  void processMessage(FastPdbServer* server,
44  ServerConnection* client);
45  };
46 
47  //------------------------------------------------------------
48  // Now method of the FastPdbServer class itself
49  //------------------------------------------------------------
50 
54  FastPdbServer(bool spawnThread, unsigned port, std::string file);
55 
59  virtual ~FastPdbServer();
60 
61  FastPdb pdb_;
62 
63  FastPdbData clientData_;
64 
65  void processClientData(ServerConnection* client);
66  void sendResponse(ServerConnection* client);
67 
68  // Inherited interface from Server
69 
70  void run();
71  void readClientData(ServerConnection* client);
72  void acceptClientAction(ServerConnection* conn);
73 
74  }; // End class FastPdbServer
75 
76  } // End namespace util
77 } // End namespace sza
78 
79 
80 
81 #endif // End #ifndef SZA_UTIL_FASTPDBSERVER_H
Tagged: Fri Feb 14 17:19:58 PST 2014.
Tagged: Tue Feb 18 13:08:16 PST 2014.