'Close the Connection\'s socket.'

def _cleanupSocket(self):

    try:
        self._sock.shutdown(socket.SHUT_WR)
    except:
        return
    try:
        while True:
            (r, w, e) = select.select([self._sock], [], [])
            if ((not r) or (not self._sock.recv(1024))):
                break
    except:
        pass
    self._sock.close()
