void openSocket(String hostname, int portNumber, Runnable process) {
		try {
			socket = new Socket(hostname, portNumber);
			process.run();
		} catch (IOException e) {
			println("Socket could not be open");
		} finally {
			closeSocket();
		}
	}