Remove dynamic exceptions
[anna.git] / include / anna / comm / internal / BinderSocket.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_internal_BinderSocket_hpp
10 #define anna_comm_internal_BinderSocket_hpp
11
12 #include <anna/comm/ClientSocket.hpp>
13
14 namespace anna {
15
16 namespace comm {
17
18 namespace handler {
19 class BinderSocket;
20 }
21
22 class ServerSocket;
23
24 //-------------------------------------------------------------------------------
25 // Socket para conectar con un bind compartido.
26 //-------------------------------------------------------------------------------
27 class BinderSocket : public ClientSocket {
28 public:
29   static const char* className() { return "anna::comm::BinderSocket"; }
30
31 private:
32   ServerSocket& a_serverSocket;
33
34   // socket Socket que esta intentando hacer el bind sobre una IP:puerto compartido.
35   BinderSocket(ServerSocket*);
36   void requestBind(const struct sockaddr* s, const int len) noexcept(false);
37   void responseBind() noexcept(false);
38   void waitBind(const Millisecond &maxDelay) noexcept(false);
39
40
41   friend class ServerSocket;
42   friend class handler::BinderSocket;
43 };
44
45 }
46 }
47
48 #endif
49
50
51