1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #include <anna/app/functions.hpp>
11 #include <anna/comm/ClientSocket.hpp>
12 #include <anna/comm/Communicator.hpp>
14 #include <anna/http/Response.hpp>
16 #include "Transaction.hpp"
22 http4comm::Transaction::Transaction () :
25 a_httpResponse = new http::Response;
29 * Si el servidor aritmético no contesta antes de que se cumpla el tiempo de espera
30 * de la transación se contesta al cliente con un error indicando la situación.
32 void http4comm::Transaction::expire (anna::timex::Engine*)
35 comm::Communicator* communicator = app::functions::component <comm::Communicator> (ANNA_FILE_LOCATION);
37 comm::ClientSocket* clientSocket = getClientSocket ();
39 if (communicator->isUsable (clientSocket) == false)
42 a_httpResponse->setStatusCode (408);
43 a_httpResponse->clearBody ();
45 clientSocket->send (a_httpResponse);