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