Move getSockets() to SocketServer interface
Any caller using add or remove should also be able to list the
sockets.
diff --git a/common/network/Socket.h b/common/network/Socket.h
index 13b12d1..53f957e 100644
--- a/common/network/Socket.h
+++ b/common/network/Socket.h
@@ -21,6 +21,8 @@
#ifndef __NETWORK_SOCKET_H__
#define __NETWORK_SOCKET_H__
+#include <list>
+
#include <limits.h>
#include <rdr/FdInStream.h>
#include <rdr/FdOutStream.h>
@@ -125,6 +127,10 @@
// resources to be freed.
virtual void removeSocket(network::Socket* sock) = 0;
+ // getSockets() gets a list of sockets. This can be used to generate an
+ // fd_set for calling select().
+ virtual void getSockets(std::list<network::Socket*>* sockets) = 0;
+
// processSocketReadEvent() tells the server there is a Socket read event.
// The implementation can indicate that the Socket is no longer active
// by calling shutdown() on it. The caller will then call removeSocket()