get_sockets_set added for external select() calls. Boost test case added to check...
[libt2n] / src / socket_server.hxx
index ae30833..74d8e07 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