From 0e2a2e49077b79bd52d6c83c5202e452e7eea091 Mon Sep 17 00:00:00 2001 From: Gerald Begumisa Date: Wed, 7 Jan 2009 13:07:31 +0000 Subject: Modified the orkaudio API, adding the record and pause HTTP commands. The record command commences or un-pauses recording while the pause command pauses recording - discarding RTP packets from when the pause command is issued. Both commands require the orkuid and party to be specified as HTTP parameters. Note that this represents a change in the arguments required for the StartCapture function in DLLs. Also added an event streaming feature which streams out all tape messages as they are reported in real-time to a client connected. Clients should connect via HTTP, on port 59150. The port is configurable by setting the parameter EventStreamingServerPort in config.xml git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@590 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkbasecxx/MultiThreadedServer.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'orkbasecxx/MultiThreadedServer.h') 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 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 +{ +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 EventStreamingAcceptor; + #endif -- cgit v1.2.3