CARMA C++
NetMonitorFrameServer.h
Go to the documentation of this file.
1 // $Id: NetMonitorFrameServer.h,v 1.4 2013/11/19 22:55:28 eml Exp $
2 
3 #ifndef SZA_UTIL_NETMONITORFRAMESERVER_H
4 #define SZA_UTIL_NETMONITORFRAMESERVER_H
5 
15 #include "carma/szautil/Server.h"
16 
17 namespace sza {
18  namespace util {
19 
20  class NetMonitorFrame;
21 
22  class NetMonitorFrameServer : public sza::util::Server {
23  public:
24 
28  NetMonitorFrameServer(bool spawnThread, unsigned port, NetMonitorFrame* ndf);
29  NetMonitorFrameServer(bool spawnThread, unsigned port, NetMonitorFrame* ndf, int fdRead);
30 
34  virtual ~NetMonitorFrameServer();
35 
36  virtual void run();
37 
38  protected:
39 
40  NetMonitorFrame* nmf_;
41  int fdRead_;
42  bool haveFrame_; // True once a data frame has been received
43 
44  void acceptClientAction(ServerConnection* conn);
45  void checkForDataFrames();
46  void sendRegisterMap(ServerConnection* conn);
47  void sendDataFrame();
48  void forwardDataFrame();
49 
50  }; // End class NetMonitorFrameServer
51 
52  } // End namespace util
53 } // End namespace sza
54 
55 
56 
57 #endif // End #ifndef SZA_UTIL_NETMONITORFRAMESERVER_H