aboutsummaryrefslogtreecommitdiffstats
path: root/win/winvnc/ManagedListener.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-05-03 14:03:55 +0200
committerPierre Ossman <ossman@cendio.se>2018-05-04 15:50:08 +0200
commite3a2be69c48893ef086110b8d92f1fadd004a997 (patch)
tree84bb7c421bf8a8d95cc615bf31a0464cd19c4c9d /win/winvnc/ManagedListener.cxx
parentf36078ad3f624400cb4e66aca95bf44d60348958 (diff)
downloadtigervnc-e3a2be69c48893ef086110b8d92f1fadd004a997.tar.gz
tigervnc-e3a2be69c48893ef086110b8d92f1fadd004a997.zip
Use abstract SocketListener class
Makes the code more general and not directly tied to specifically TCP sockets.
Diffstat (limited to 'win/winvnc/ManagedListener.cxx')
-rw-r--r--win/winvnc/ManagedListener.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/win/winvnc/ManagedListener.cxx b/win/winvnc/ManagedListener.cxx
index 9137238a..a8c6f25e 100644
--- a/win/winvnc/ManagedListener.cxx
+++ b/win/winvnc/ManagedListener.cxx
@@ -31,7 +31,7 @@ ManagedListener::ManagedListener(SocketManager* mgr)
ManagedListener::~ManagedListener() {
if (!sockets.empty()) {
- std::list<network::TcpListener*>::iterator iter;
+ std::list<network::SocketListener*>::iterator iter;
for (iter = sockets.begin(); iter != sockets.end(); ++iter)
manager->remListener(*iter);
sockets.clear();
@@ -62,7 +62,7 @@ void ManagedListener::setFilter(const char* filterStr) {
delete filter;
filter = new network::TcpFilter(filterStr);
if (!sockets.empty() && !localOnly) {
- std::list<network::TcpListener*>::iterator iter;
+ std::list<network::SocketListener*>::iterator iter;
for (iter = sockets.begin(); iter != sockets.end(); ++iter)
(*iter)->setFilter(filter);
}
@@ -80,7 +80,7 @@ bool ManagedListener::isListening() {
}
void ManagedListener::refresh() {
- std::list<network::TcpListener*>::iterator iter;
+ std::list<network::SocketListener*>::iterator iter;
if (!sockets.empty()) {
for (iter = sockets.begin(); iter != sockets.end(); ++iter)
manager->remListener(*iter);
@@ -107,7 +107,7 @@ void ManagedListener::refresh() {
for (iter = sockets.begin(); iter != sockets.end(); ++iter)
manager->addListener(*iter, server, addrChangeNotifier);
} catch (...) {
- std::list<network::TcpListener*>::iterator iter2;
+ std::list<network::SocketListener*>::iterator iter2;
for (iter2 = sockets.begin(); iter2 != iter; ++iter2)
manager->remListener(*iter2);
for (; iter2 != sockets.end(); ++iter2)