Adding DOCUMENTATION flag to the CMakeLists.txt
[libt2n] / src / socket_server.hxx
index f3dd1c5..bbba379 100644 (file)
@@ -24,6 +24,7 @@ on this file might be covered by the GNU General Public License.
 
 #include <sys/types.h>
 #include <string>
+#include <set>
 
 #include "server.hxx"
 #include "socket_handler.hxx"
@@ -48,6 +49,7 @@ class socket_server : public socket_handler, public server
     private:
         fd_set connection_set;
         std::string unix_path;
+        std::set<int> sockets_set;
 
         void start_listening();
 
@@ -67,6 +69,8 @@ class socket_server : public socket_handler, public server
         ~socket_server();
 
         bool fill_buffer(long long usec_timeout=-1,long long* usec_timeout_remaining=NULL);
+        std::set<int> get_sockets_set()
+            { return sockets_set; };
 };
 
 /** @brief Socket based connection
@@ -79,7 +83,7 @@ class socket_server_connection : public socket_handler, public server_connection
 
     private:
         socket_server_connection(int _sock, socket_type_value _stype, int _timeout)
-           : server_connection(_timeout), socket_handler(_sock,_stype)
+           : socket_handler(_sock,_stype), server_connection(_timeout)
            { }
 
         ~socket_server_connection();
@@ -91,8 +95,7 @@ class socket_server_connection : public socket_handler, public server_connection
             { socket_write(data); }
 
     public:
-        bool fill_buffer(long long usec_timeout=-1,long long* usec_timeout_remaining=NULL)
-            { return socket_handler::fill_buffer(buffer,usec_timeout,usec_timeout_remaining); }
+        bool fill_buffer(long long usec_timeout=-1,long long* usec_timeout_remaining=NULL);
 
         virtual void close();
 };