D
D
Daniel2018-02-11 04:35:58
Java
Daniel, 2018-02-11 04:35:58

Why does ObjectInputStream java return the same object when reading a Socket in a loop?

What could be the error, like I read that it reads only once. And I didn't find any examples.

//@Socket client
ObjectInputStream from_client=new ObjectInputStream(client.getInputStream());
        Request request; // реализовал serializable

        while(isConnect){
         
            request=(Request)from_client.readObject(); // всегда один и тот же обьект, хотя клиент 
                                                                                  // отправляет всегда новый, проверял
//.....

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question