NEW Restruct launcher source code. Separate classes in different files to improve...
[anna.git] / example / diameter / launcher / MyHandler.hpp
index e69de29..5f04d91 100644 (file)
@@ -0,0 +1,29 @@
+// ANNA - Anna is Not Nothingness Anymore                                                         //
+//                                                                                                //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
+//                                                                                                //
+// See project site at http://redmine.teslayout.com/projects/anna-suite                           //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
+
+
+#ifndef example_diameter_launcher_MyHandler_hpp
+#define example_diameter_launcher_MyHandler_hpp
+
+// Project
+#include <anna/http/Response.hpp>
+#include <anna/http/Handler.hpp>
+
+
+class MyHandler : public anna::http::Handler {
+public:
+  MyHandler() : anna::http::Handler("http_converter::MyHandler") {
+    allocateResponse()->createHeader(anna::http::Header::Type::Date);
+  }
+
+private:
+
+  void evRequest(anna::comm::ClientSocket&, const anna::http::Request& request) throw(anna::RuntimeException);
+  void evResponse(anna::comm::ClientSocket&, const anna::http::Response&) throw(anna::RuntimeException) {;}
+};
+
+#endif