diff --git a/common/network/Socket.h b/common/network/Socket.h
index 382b270..39ac39b 100644
--- a/common/network/Socket.h
+++ b/common/network/Socket.h
@@ -35,13 +35,11 @@
     Socket(int fd)
       : instream(new rdr::FdInStream(fd)),
       outstream(new rdr::FdOutStream(fd)),
-      ownStreams(true), isShutdown_(false),
+      isShutdown_(false),
       queryConnection(false) {}
     virtual ~Socket() {
-      if (ownStreams) {
-        delete instream;
-        delete outstream;
-      }
+      delete instream;
+      delete outstream;
     }
     rdr::FdInStream &inStream() {return *instream;}
     rdr::FdOutStream &outStream() {return *outstream;}
@@ -52,30 +50,22 @@
     bool isShutdown() const {return isShutdown_;}
     virtual bool cork(bool enable) = 0;
 
-    // information about this end of the socket
-    virtual int getMyPort() = 0;
-
     // information about the remote end of the socket
     virtual char* getPeerAddress() = 0; // a string e.g. "192.168.0.1"
-    virtual int getPeerPort() = 0;
     virtual char* getPeerEndpoint() = 0; // <address>::<port>
 
-    // Is the remote end on the same machine?
-    virtual bool sameMachine() = 0;
-
     // Was there a "?" in the ConnectionFilter used to accept this Socket?
     void setRequiresQuery() {queryConnection = true;}
     bool requiresQuery() const {return queryConnection;}
 
   protected:
-    Socket() : instream(0), outstream(0), ownStreams(false),
+    Socket() : instream(0), outstream(0),
       isShutdown_(false), queryConnection(false) {}
-    Socket(rdr::FdInStream* i, rdr::FdOutStream* o, bool own)
-      : instream(i), outstream(o), ownStreams(own),
+    Socket(rdr::FdInStream* i, rdr::FdOutStream* o)
+      : instream(i), outstream(o),
       isShutdown_(false), queryConnection(false) {}
     rdr::FdInStream* instream;
     rdr::FdOutStream* outstream;
-    bool ownStreams;
     bool isShutdown_;
     bool queryConnection;
   };
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 4287132..555ce21 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -28,21 +28,19 @@
 #else
 #define errorNumber errno
 #define closesocket close
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
 #include <netinet/tcp.h>
 #include <netdb.h>
 #include <errno.h>
-#include <string.h>
 #include <signal.h>
 #include <fcntl.h>
 #endif
 
 #include <stdlib.h>
 #include <unistd.h>
+
 #include <network/TcpSocket.h>
-#include <rfb/util.h>
 #include <rfb/LogWriter.h>
 #include <rfb/Configuration.h>
 
@@ -120,13 +118,12 @@
 
 // -=- TcpSocket
 
-TcpSocket::TcpSocket(int sock, bool close)
-  : Socket(new FdInStream(sock), new FdOutStream(sock), true), closeFd(close)
+TcpSocket::TcpSocket(int sock)
+  : Socket(new FdInStream(sock), new FdOutStream(sock))
 {
 }
 
 TcpSocket::TcpSocket(const char *host, int port)
-  : closeFd(true)
 {
   int sock, err, result;
   struct addrinfo *ai, *current, hints;
@@ -225,16 +222,10 @@
   // Create the input and output streams
   instream = new FdInStream(sock);
   outstream = new FdOutStream(sock);
-  ownStreams = true;
 }
 
 TcpSocket::~TcpSocket() {
-  if (closeFd)
-    closesocket(getFd());
-}
-
-int TcpSocket::getMyPort() {
-  return getSockPort(getFd());
+  closesocket(getFd());
 }
 
 char* TcpSocket::getPeerAddress() {
@@ -281,25 +272,20 @@
   return rfb::strDup("");
 }
 
-int TcpSocket::getPeerPort() {
+char* TcpSocket::getPeerEndpoint() {
+  rfb::CharArray address; address.buf = getPeerAddress();
   vnc_sockaddr_t sa;
   socklen_t sa_size = sizeof(sa);
+  int port;
 
   getpeername(getFd(), &sa.u.sa, &sa_size);
 
-  switch (sa.u.sa.sa_family) {
-  case AF_INET6:
-    return ntohs(sa.u.sin6.sin6_port);
-  case AF_INET:
-    return ntohs(sa.u.sin.sin_port);
-  default:
-    return 0;
-  }
-}
-
-char* TcpSocket::getPeerEndpoint() {
-  rfb::CharArray address; address.buf = getPeerAddress();
-  int port = getPeerPort();
+  if (sa.u.sa.sa_family == AF_INET6)
+    port = ntohs(sa.u.sin6.sin6_port);
+  else if (sa.u.sa.sa_family == AF_INET)
+    port = ntohs(sa.u.sin.sin_port);
+  else
+    port = 0;
 
   int buflen = strlen(address.buf) + 32;
   char* buffer = new char[buflen];
@@ -307,31 +293,6 @@
   return buffer;
 }
 
-bool TcpSocket::sameMachine() {
-  vnc_sockaddr_t peeraddr, myaddr;
-  socklen_t addrlen;
-
-  addrlen = sizeof(peeraddr);
-  if (getpeername(getFd(), &peeraddr.u.sa, &addrlen) < 0)
-      throw SocketException ("unable to get peer address", errorNumber);
-
-  addrlen = sizeof(myaddr); /* need to reset, since getpeername overwrote */
-  if (getsockname(getFd(), &myaddr.u.sa, &addrlen) < 0)
-      throw SocketException ("unable to get my address", errorNumber);
-
-  if (peeraddr.u.sa.sa_family != myaddr.u.sa.sa_family)
-      return false;
-
-  if (peeraddr.u.sa.sa_family == AF_INET6)
-      return IN6_ARE_ADDR_EQUAL(&peeraddr.u.sin6.sin6_addr,
-                                &myaddr.u.sin6.sin6_addr);
-  if (peeraddr.u.sa.sa_family == AF_INET)
-    return (peeraddr.u.sin.sin_addr.s_addr == myaddr.u.sin.sin_addr.s_addr);
-
-  // No idea what this is. Assume we're on different machines.
-  return false;
-}
-
 void TcpSocket::shutdown()
 {
   Socket::shutdown();
diff --git a/common/network/TcpSocket.h b/common/network/TcpSocket.h
index 74ff4c5..87d8e69 100644
--- a/common/network/TcpSocket.h
+++ b/common/network/TcpSocket.h
@@ -50,16 +50,12 @@
 
   class TcpSocket : public Socket {
   public:
-    TcpSocket(int sock, bool close=true);
+    TcpSocket(int sock);
     TcpSocket(const char *name, int port);
     virtual ~TcpSocket();
 
-    virtual int getMyPort();
-
     virtual char* getPeerAddress();
-    virtual int getPeerPort();
     virtual char* getPeerEndpoint();
-    virtual bool sameMachine();
 
     virtual void shutdown();
     virtual bool cork(bool enable);
@@ -67,8 +63,6 @@
     static bool enableNagles(int sock, bool enable);
     static bool isListening(int sock);
     static int getSockPort(int sock);
-  private:
-    bool closeFd;
   };
 
   class TcpListener : public SocketListener {
diff --git a/common/network/UnixSocket.cxx b/common/network/UnixSocket.cxx
index f464ac8..8a223e4 100644
--- a/common/network/UnixSocket.cxx
+++ b/common/network/UnixSocket.cxx
@@ -21,13 +21,11 @@
 #include <config.h>
 #endif
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <unistd.h>
 #include <errno.h>
-#include <string.h>
 #include <signal.h>
 #include <fcntl.h>
 #include <stdlib.h>
@@ -53,13 +51,12 @@
 
 // -=- UnixSocket
 
-UnixSocket::UnixSocket(int sock, bool close)
-  : Socket(new FdInStream(sock), new FdOutStream(sock), true), closeFd(close)
+UnixSocket::UnixSocket(int sock)
+  : Socket(new FdInStream(sock), new FdOutStream(sock))
 {
 }
 
 UnixSocket::UnixSocket(const char *path)
-  : closeFd(true)
 {
   int sock, err, result;
   sockaddr_un addr;
@@ -94,16 +91,10 @@
   // Create the input and output streams
   instream = new FdInStream(sock);
   outstream = new FdOutStream(sock);
-  ownStreams = true;
 }
 
 UnixSocket::~UnixSocket() {
-  if (closeFd)
-    close(getFd());
-}
-
-int UnixSocket::getMyPort() {
-  return 0;
+  close(getFd());
 }
 
 char* UnixSocket::getPeerAddress() {
@@ -137,18 +128,10 @@
   return rfb::strDup("(unnamed UNIX socket)");
 }
 
-int UnixSocket::getPeerPort() {
-  return 0;
-}
-
 char* UnixSocket::getPeerEndpoint() {
   return getPeerAddress();
 }
 
-bool UnixSocket::sameMachine() {
-  return true;
-}
-
 void UnixSocket::shutdown()
 {
   Socket::shutdown();
@@ -208,11 +191,6 @@
   }
 }
 
-UnixListener::UnixListener(int sock)
-{
-  fd = sock;
-}
-
 UnixListener::~UnixListener()
 {
   struct sockaddr_un addr;
diff --git a/common/network/UnixSocket.h b/common/network/UnixSocket.h
index 30eda78..48c5b63 100644
--- a/common/network/UnixSocket.h
+++ b/common/network/UnixSocket.h
@@ -35,28 +35,20 @@
 
   class UnixSocket : public Socket {
   public:
-    UnixSocket(int sock, bool close=true);
+    UnixSocket(int sock);
     UnixSocket(const char *name);
     virtual ~UnixSocket();
 
-    virtual int getMyPort();
-
     virtual char* getPeerAddress();
-    virtual int getPeerPort();
     virtual char* getPeerEndpoint();
-    virtual bool sameMachine();
 
     virtual void shutdown();
     virtual bool cork(bool enable);
-
-  private:
-    bool closeFd;
   };
 
   class UnixListener : public SocketListener {
   public:
     UnixListener(const char *listenaddr, int mode);
-    UnixListener(int sock);
     virtual ~UnixListener();
 
     virtual void shutdown();
