private void prompt() {
        try {
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                System.out.println("1 - Send message to client using ClientID");
                System.out.println("2 - Tell clients to communicate directly");
                System.out.println("3 - List connected clients");
                System.out.println("4 - Quit");
                String line = in.readLine();
                if (line == null) {
                    break;
                }
                if (line.equals("1")) {
                    System.out.print("ClientID: ");
                    String id = in.readLine();
                    System.out.print("Text: ");
                    String text = in.readLine();

                    if (clientsMap.containsKey(id)) {
                        TextMessage.Builder msg = TextMessage.newBuilder();
                        msg.setText(text);
                        writeMsg(id, msg.build());
                    }
                } else if (line.equals("2")) {
                    System.out.print("ClientID of server mode: ");
                    String id1 = in.readLine();

                    System.out.print("Server Port: ");
                    Integer port = Integer.parseInt(in.readLine());

                    DirectlyCommunication.Builder msg1 = DirectlyCommunication.newBuilder();
                    msg1.setMode(0);
                    msg1.setName(id1);
                    msg1.setPort(port);

                    writeMsg(id1, msg1.build());

                    System.out.print("ClientID of client mode: ");
                    String id2 = in.readLine();
                    System.out.print("Text: ");
                    String text = in.readLine();
                    DirectlyCommunication.Builder msg2 = DirectlyCommunication.newBuilder();
                    msg2.setMode(1);
                    msg2.setPort(port);
                    msg2.setName(id2);
                    msg2.setHost(clientsMap.get(id1).getFirst());
                    msg2.setText(text);

                    writeMsg(id2, msg2.build());

                } else if (line.equals("3")) {
                    System.out.println("Connected Clients:");
                    for(String id : clientsMap.keySet()) {
                        System.out.println(id);
                    }
                    System.out.println();
                } else {
                    System.exit(0);
                }
            }
        } catch (IOException e) {
            logger.error(e.getMessage(), e);
        } catch (InterruptedException e) {
            logger.error(e.getMessage(), e);
        }
    }