Inherit SocketServer directly from VNCServer
This makes VNCServer a sufficiently complete interface that callers
don't need to know about the specific implementation (VNCServerST
currently). And assuming that all servers will use sockets is not
that outrageous.
diff --git a/common/rfb/VNCServer.h b/common/rfb/VNCServer.h
index 5bb7c0b..298326f 100644
--- a/common/rfb/VNCServer.h
+++ b/common/rfb/VNCServer.h
@@ -22,15 +22,16 @@
#ifndef __RFB_VNCSERVER_H__
#define __RFB_VNCSERVER_H__
+#include <network/Socket.h>
+
#include <rfb/UpdateTracker.h>
#include <rfb/SSecurity.h>
#include <rfb/ScreenSet.h>
-namespace network { class Socket; }
-
namespace rfb {
- class VNCServer : public UpdateTracker {
+ class VNCServer : public UpdateTracker,
+ public network::SocketServer {
public:
// blockUpdates()/unblockUpdates() tells the server that the pixel buffer
// is currently in flux and may not be accessed. The attributes of the
diff --git a/common/rfb/VNCServerST.h b/common/rfb/VNCServerST.h
index 52b2289..ed8561a 100644
--- a/common/rfb/VNCServerST.h
+++ b/common/rfb/VNCServerST.h
@@ -31,7 +31,6 @@
#include <rfb/Blacklist.h>
#include <rfb/Cursor.h>
#include <rfb/Timer.h>
-#include <network/Socket.h>
#include <rfb/ScreenSet.h>
namespace rfb {
@@ -43,8 +42,7 @@
class KeyRemapper;
class VNCServerST : public VNCServer,
- public Timer::Callback,
- public network::SocketServer {
+ public Timer::Callback {
public:
// -=- Constructors