@SuppressWarnings("unused")
	public void connect() throws IOException {
		if (regLevel != 0) // otherwise disconnected or connect
			throw new SocketException("Socket closed or already open ("+ regLevel +")");
		IOException exception = null;
		Socket s = null;
		try {
			s = new Socket(host, port);
			exception = null; 
		} catch (IOException exc) {
			if (s != null)
				s.close();
			s = null;
			exception = exc; 
		}
		if (exception != null) 
			throw exception; // connection wasn't successful at any port

		prepare(s);
	}