public void notifyForRequest(String recievedMessage, String fname, String add, String size) throws IOException {
        //
        switch (recievedMessage) {
            case "REQUEST_TO_SEND_FILE":
                // show the message to the user
                System.out.println(fname);
                recievingFileDetails[0] = fname;
                recievingFileDetails[1] = add;
                recievingFileDetails[2] = size;
                int accept = JOptionPane.showConfirmDialog(myPanel, "Save File ?");
                if (accept == JOptionPane.YES_OPTION) {
                    // recieve file
                    try {
                        JFileChooser saveDialog = new JFileChooser();
                        saveDialog.setSelectedFile(new File(fname));
                        int result = saveDialog.showSaveDialog(saveDialog);
                        ServerSocket fsSocket;
                        Socket fSocket;
                        switch (result) {
                            case JFileChooser.APPROVE_OPTION: {
                                String saveDirectory = saveDialog.getCurrentDirectory().getAbsolutePath();
                                fsSocket = new ServerSocket(4646);
                                sendMessage("CLEAR_TO_SEND_FILE##$$");
                                fSocket = fsSocket.accept();
                                ReceiveFileThread rfThread = new ReceiveFileThread(fSocket, saveDirectory, fname, recievingFileDetails[2]);
                                rfThread.start();
                                fsSocket.close();
                                break;
                            }
                            case JFileChooser.CANCEL_OPTION:
                                break;
                            case JFileChooser.ERROR_OPTION:
                                break;
                        }
                    } catch (HeadlessException | IOException e) {
                        System.out.println("Error in TalkerWindow while sending CLEAR_TO_SEND_FILE" + e);
                    }
                }
                break;
            case "CLEAR_TO_SEND_FILE":
                File FTS = fileToSend;
                Socket fSendSocket;
                try {
                    fSendSocket = new Socket(talkSocket.getInetAddress(), 4646);
                    SendFileThread sfThread = new SendFileThread(fSendSocket, FTS);
                    sfThread.start();
                } catch (Exception E) {
                    JOptionPane.showMessageDialog(null, "Either the specified IP Address is offline or the host is not in your network:\n " + E, " \n Host Not Found ", JOptionPane.WARNING_MESSAGE);
                } finally {
                    fileToSend = null;
                }
                break;
            case "CLOSING_TALK":
                IPRegister.removeIP(talkSocket.getInetAddress().toString().substring(1));
                dos.close();
        }
    }