From 77c22b76a19793f36377ca10d7137522720548e4 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 26 Feb 2013 18:21:12 +0000 Subject: thread messaging --- rotord/rotord.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'rotord/rotord.cpp') diff --git a/rotord/rotord.cpp b/rotord/rotord.cpp index fc74801..6ea61df 100755 --- a/rotord/rotord.cpp +++ b/rotord/rotord.cpp @@ -188,12 +188,21 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS } } else { - if (command[0]=="audio") { + //in a way the rest of this stuff happens inside the thread + //its not elegant to decipher the message just to assemble another message to decipher elsewhere! + //pass a message object with the command type and contents selected? + //every action will have a seperate work function in the render_context + //some of these functions have to return data immediately- maybe a queue isn't the ideal model + if (command[1]=="audio") { if (request.getMethod()=="PUT") { //get audio file location and initiate analysis - stringstream str; - str << request.stream(); - //content << str; + std::string s; + std::ostringstream os; + os<)task)->add_queue(s); + content="1\n"; } } -- cgit v1.2.3