problem when closing sockets
Hello,
under Linux and Windows, I got a strange and different behaviors when closing socket.
Under Linux if i send in turn 1000 byte arrays over the socket and close the socket after that. the receiver will receive the 1000 packets and then -1. In addition the sender has finnished to send every packets and close the socket before the receiver received everything.
under Windows, the receiver gets few packets and get -1 exactly when the connection is close by the remote peer. So it never receive all packets that have been sent.
I also flush the socket after each call of the write method, but it did not help.
Could you explain me a bit more if this is an issue of the underlying socket implementation on the different OS or if i need to add something(change something) in my code?
thanks
sebastien

