public void connect(String address, String name) {
		this.name = name;
		String host;
		int port = Server.PORT_RANGE_LOWER;
		int splitIndex = address.lastIndexOf(':');
		if (splitIndex == -1) {
			host = address;
		} else {
			host = address.substring(0, splitIndex);
			port = Integer.parseInt(address.substring(splitIndex + 1));
		}

		try {
			channel = SocketChannel.open();
			channel.configureBlocking(false);
			selector = Selector.open();
			channel.register(selector, SelectionKey.OP_CONNECT);
			channel.connect(new InetSocketAddress(host, port));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}