diff options
author | Pierre Ossman <ossman@cendio.se> | 2016-10-05 13:39:11 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2016-10-05 13:39:11 +0200 |
commit | 574dc64dfe1e2c8b52348f95619a845172282238 (patch) | |
tree | 2957273b0d4bd04a81b9a69c7a0cb22772c4ab85 /common/network | |
parent | 3fed95eda27dfbeee6535f987f5d14a66f64749b (diff) | |
download | tigervnc-574dc64dfe1e2c8b52348f95619a845172282238.tar.gz tigervnc-574dc64dfe1e2c8b52348f95619a845172282238.zip |
Move getSockets() to SocketServer interface
Any caller using add or remove should also be able to list the
sockets.
Diffstat (limited to 'common/network')
-rw-r--r-- | common/network/Socket.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/network/Socket.h b/common/network/Socket.h index 13b12d1d..53f957e6 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 @@ namespace network { // 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() |