Use abstract SocketListener class
Makes the code more general and not directly tied to specifically
TCP sockets.
diff --git a/common/network/TcpSocket.h b/common/network/TcpSocket.h
index c1b142f..74ff4c5 100644
--- a/common/network/TcpSocket.h
+++ b/common/network/TcpSocket.h
@@ -80,16 +80,17 @@
virtual void shutdown();
virtual Socket* accept();
+ virtual int getMyPort();
+
static void getMyAddresses(std::list<char*>* result);
- int getMyPort();
};
- void createLocalTcpListeners(std::list<TcpListener*> *listeners,
+ void createLocalTcpListeners(std::list<SocketListener*> *listeners,
int port);
- void createTcpListeners(std::list<TcpListener*> *listeners,
+ void createTcpListeners(std::list<SocketListener*> *listeners,
const char *addr,
int port);
- void createTcpListeners(std::list<TcpListener*> *listeners,
+ void createTcpListeners(std::list<SocketListener*> *listeners,
const struct addrinfo *ai);
typedef struct vnc_sockaddr {