I have a query regarding the behaviour of winsock recv function.

I am using:
socket - connection-oriented(TCP)
calls - blocking type.

If the sender does a send() operation & immediately performs hard close of the socket, can the receiver get the data if it has called a recv() operation OR will it get WSACONNRESET error code?

What would be the case if instead of recv() the reciever is using select i/o model? Will the event for read be received first OR for the exception?


Thanks a lot...