public void close()
	{
		connected = false;

		// We could join here, but should leave that to the programmer
		// Typically close should be preceded by a call to join if necessary

		try
		{
			if (sslsocket != null)
				sslsocket.close();
		}
		catch (IOException e)
		{
			// Do nothing
			// e.printStackTrace();
		}

		// Reset pending invokes and callbacks so this connection can be restarted
		pendingInvokes = Collections.synchronizedSet(new HashSet<Integer>());
		callbacks = Collections.synchronizedMap(new HashMap<Integer, Callback>());
	}