ANNA Suite  2020b
Multipurpose development suite for Telco applications
ServerSocket.hpp
Go to the documentation of this file.
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 
Definition: Communicator.hpp:79
Definition: Node.hpp:56
ServerSocket(Communicator *communicator)
Definition: ServerSocket.hpp:26
Definition: ServerSocket.hpp:24
Definition: Handler.hpp:42
void setup(comm::ServerSocket *serverSocket)
Definition: ServerSocket.hpp:31
Definition: ServerSocket.hpp:37
Definition: app.hpp:12
Definition: Handler.hpp:33
Definition: Handler.hpp:47