public void listen() 
    {
        String s;
        while ((s = in.readLine()) != null) 
        {
            if (s.equals("/accept"))
            {
                try
                {
                    System.out.println("Client making new audio chat socket on port: "+(socket.getPort()+1));
                if (audioClient==null)
                { audioClient = new AudioClient(new Socket(socket.getInetAddress(), socket.getPort()+1)); audioClient.start(); }
                
                else 
                    System.out.println("Duplicate audio chat clients attempted...?");
                } catch (Exception e){ e.printStackTrace(); }
            }
            
            else if (s.equals("/decline"))
            {
                if (audioClient!=null){ audioClient.stopRunning(); audioClient = null; }
            }
            
            else
            {
            enteredText.insert(s + "\n", enteredText.getText().length());
            enteredText.setCaretPosition(enteredText.getText().length());   
            
            }
        }
        out.close();
        in.close();
        try                 { socket.close();      }
        catch (Exception e) { e.printStackTrace(); }
        System.err.println("Closed client socket");
    }