Object IO Stream Data Loss Possible? Any solution, pls?
I've created a client and server program. The server sends a queue object containing some objects through the connection. And the client receives it and processes it.
On the first sending of queue object, the client receives the queue object with the elements in it ok. However, in the succeeding sends and receives by the server and client, respectively, the client receives the queue, but with empty size or no elements at all. I've already checked the server by printing the size of the queue object about to be sent and I'm sure the queue is not empty.
So I've proceeded to debug the client. When printing the size of the queue after immediately receiving it, as mentioned above, the first receive has the elements, but the succeeding has 0 elements.
I've also checked by just sending String objects, and the weird thing is that everything works fine with the Strings all through out the run time.
I'm stumped for days with this problem. Can anybody suggest a way to debug this? Or has anybody encountered the same problem? Or should I just start overhauling things and pass Strings or some sort of packet instead?
|