@Override
	public void run() {
		while (!serverSocket.isClosed()) {
			try (Socket socket = serverSocket.accept();
					BufferedReader input =
						new BufferedReader(new InputStreamReader(socket.getInputStream()));
					PrintWriter output = new PrintWriter(socket.getOutputStream())) {
				String line;
				while ((line = input.readLine()) != null) {
					String command = line.substring(0, line.indexOf('_'));
					if (command.equals("open")) {
						openInEditor(line.substring(line.indexOf('_') + 1));
					}
				}
			}
			catch (IOException e) {
				// Socket was closed
			}
		}
	}
Creates a new runnable.

@param serverSocket The server socket that will be accepting client connections.
GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/ghidrascripteditor/SocketSetupRunnable.java