diff options
Diffstat (limited to 'orkbasecxx/MultiThreadedServer.h')
-rw-r--r-- | orkbasecxx/MultiThreadedServer.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/orkbasecxx/MultiThreadedServer.h b/orkbasecxx/MultiThreadedServer.h index f6ea6dc..58c0622 100644 --- a/orkbasecxx/MultiThreadedServer.h +++ b/orkbasecxx/MultiThreadedServer.h @@ -61,5 +61,25 @@ private: }; typedef ACE_Acceptor<HttpServer, ACE_SOCK_ACCEPTOR> HttpAcceptor; +//========================================================== + +/** This server is a lightweight http server that prints out the single line + format of all events from a given port, one thread per connection e.g + http://localhost:23000/message=streamevents +*/ +class EventStreamingServer : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +{ +public: + virtual int open (void *); + /** daemon thread */ + static void run(void *args); + /** service routine */ + virtual int svc (void); + +private: + static log4cxx::LoggerPtr s_log; +}; +typedef ACE_Acceptor<EventStreamingServer, ACE_SOCK_ACCEPTOR> EventStreamingAcceptor; + #endif |