void openServerSocket(int portNumber, Runnable process) {
		ServerSocket serverSocket = null;
		try {
			serverSocket = new ServerSocket(portNumber);
			socket = serverSocket.accept();
			process.run();
		} catch (IOException e) {
			println("ServerSocket could not be open");
		} finally {
			if (serverSocket != null) {
				try {
					serverSocket.close();
				} catch (IOException e1) {
					e1.printStackTrace();
				}
			}
			closeSocket();
		}
	}