public void run() {
        try {
            userInfo = new UserInfo();

            Packet pc[];
            userInfo.sendMessage("Send Info");
            userInfo.setUser("Mahi");
            oos.writeObject(userInfo);
            oos.flush();
            System.out.println("Connection established");

            while (true)
            {
               pc = (Packet[])ois.readObject();
               if(pc!=null)
               {
                   updatePackets(pc);
                  
               }
            }

        } catch (Exception ex) {
            System.out.println("Exception In run of new Client "+ ex);
        }finally{
            try {
                ois.close();
                oos.close();
            } catch (Exception ex) {
               
            }
        }
    }