I am having a TCP server and TCP client running in java. Its a one-way communication. Client establishers connection with server and keeps sending packets. Server keeps listening for the packets continuously. Server never responds. It just consumes packets.
Lets say the client sent 10th packet. Before sending 11th packet the server crashed. I am expecting exception when sending 11th packet. But I am getting exception on 12th packet.
Do you guys know how to resolve this problem? I want to get exception on 11th packet only.
I think the problem is occuring on Linux platform. On Windows platform there is no problem.