Remove dynamic exceptions
[anna.git] / include / anna / comm / handler / ServerSocket.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
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 //
7
8
9 #ifndef anna_comm_handler_ServerSocket_hpp
10 #define anna_comm_handler_ServerSocket_hpp
11
12 #include <anna/comm/Handler.hpp>
13
14 namespace anna {
15
16 namespace comm {
17
18 class ServerSocket;
19 class LocalConnection;
20
21 namespace handler {
22
23
24 class ServerSocket : public Handler {
25 public:
26   ServerSocket(Communicator* communicator) :
27     Handler(communicator, Handler::Type::ServerSocket, Support::None),
28     a_serverSocket(NULL)
29   {;}
30
31   void setup(comm::ServerSocket* serverSocket) { a_serverSocket = serverSocket; }
32
33 private:
34   comm::ServerSocket* a_serverSocket;
35
36   void initialize() noexcept(false) ;
37   void apply() noexcept(false);
38   void breakAddress(const in_addr_t&)  ;
39   void finalize() ;
40
41   std::string asString() const ;
42   xml::Node* asXML(xml::Node*) const ;
43 };
44
45 }
46 }
47 }
48
49 #endif
50