Index: src/xplcommon/win32/LocalClientSocket.cc
===================================================================
--- src/xplcommon/win32/LocalClientSocket.cc	(revision 22)
+++ 	(revision )
@@ -1,44 +1,0 @@
-// Copyright (c) 2012 by István Váradi
-
-// This file is part of libxplcommon, a common utility library for
-// development related to X-Plane
-
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-
-// 1. Redistributions of source code must retain the above copyright notice, this
-//    list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright notice,
-//    this list of conditions and the following disclaimer in the documentation
-//    and/or other materials provided with the distribution.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "LocalClientSocket.h"
-
-//------------------------------------------------------------------------------
-
-using xplcommon::win32::LocalClientSocket;
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: src/xplcommon/win32/LocalServerSocketBase.cc
===================================================================
--- src/xplcommon/win32/LocalServerSocketBase.cc	(revision 25)
+++ src/xplcommon/win32/LocalServerSocketBase.cc	(revision 26)
@@ -60,9 +60,19 @@
 {
     if (overlapped!=0) overlapped->reset();
-    bool result = LocalSocket::connectNamedPipe(handle, overlapped);
-    if (!result && overlapped==0) {
-        setErrorCode(GetLastError());
+    bool result = ConnectNamedPipe(handle,
+                                   (overlapped==0) ? 0 : overlapped->get());
+    DWORD error = GetLastError();
+    if (!result &&
+        (overlapped==0 ||
+         (error!=ERROR_IO_PENDING && error!=ERROR_IO_INCOMPLETE)))
+    {
+        setErrorCode(error);
+        return false;
+    } else if (overlapped==0) {
+        return result;
+    } else {
+        DWORD dummy = 0;
+        return overlapped->getResult(dummy, handle);
     }
-    return result;
 }
 
Index: src/xplcommon/win32/LocalSocket.h
===================================================================
--- src/xplcommon/win32/LocalSocket.h	(revision 22)
+++ src/xplcommon/win32/LocalSocket.h	(revision 26)
@@ -58,25 +58,4 @@
     static void setupPath(char* dest, const char* name);
 
-    /**
-     * Create a new named pipe with the proper settings. The handle
-     * will be returned on successful creation.
-     *
-     * @param name the name of the pipe to create. It should be the
-     * final name, not the user-given one.
-     *
-     * @return the handle if the pipe could be created.
-     */
-    static HANDLE createNamedPipe(const char* name, bool overlapped);
-
-    /**
-     * Connect the named pipe with the given handle.
-     *
-     * @return true if the connection is established. If overlapped is
-     * 0 and false is returned, it has failed. If overlapped is not 0,
-     * the failer status of the Failable associated with the
-     * Overlapped instance provides failure information.
-     */
-    static bool connectNamedPipe(HANDLE handle, Overlapped* overlapped);
-
 protected:
     /**
@@ -105,17 +84,4 @@
 {
     snprintf(dest, 256, "\\\\.\\pipe\\%s", name);
-}
-
-//------------------------------------------------------------------------------
-
-inline bool LocalSocket::connectNamedPipe(HANDLE handle, Overlapped* overlapped)
-{
-    OVERLAPPED* ol = (overlapped==0) ? 0 : overlapped->get();
-    bool result = ConnectNamedPipe(handle, ol);
-    if (overlapped!=0) {
-        DWORD dummy = 0;
-        result = overlapped->getResult(dummy, handle);
-    }
-    return result;
 }
 
Index: src/xplcommon/win32/Makefile.am
===================================================================
--- src/xplcommon/win32/Makefile.am	(revision 21)
+++ src/xplcommon/win32/Makefile.am	(revision 26)
@@ -11,6 +11,5 @@
 	LocalAcceptor.cc	\
 	LocalServerSocketBase.cc\
-	LocalConnector.cc	\
-	LocalClientSocket.cc
+	LocalConnector.cc
 
 include_xplcommon_win32dir=$(includedir)/xplcommon/win32
Index: src/xplcommon/win32/Overlapped.h
===================================================================
--- src/xplcommon/win32/Overlapped.h	(revision 22)
+++ src/xplcommon/win32/Overlapped.h	(revision 26)
@@ -85,5 +85,5 @@
      * bytes read or written, which may be 0 for an end-of-file
      * condition
-     * @param file the handle of the file on which the operation in
+     * @param file the handle of the object on which the operation in
      * question was performed
      *
