public void run()
      {
           try {
                ois = new ObjectInputStream(socket.getInputStream());

               userInfo = (UserInfo)ois.readObject();

               if(userInfo!=null){

                   System.out.println("Your name is :  "+userInfo.getUserName());
                   writers.add(oos);
               }
               while(true){
               pc = (Packet)ois.readObject();
               if(pc!=null)
               {
                     display.updatePackets(pc);
                     for (ObjectOutputStream writer : writers) {
                        writer.writeObject(display.getPackets());
                    }
                }
                }
               }catch(Exception ex){
                      System.err.println("Client connection has closed. " +ex);
               }
       }