It depends in part on the size expected by the receive and the amount of data transmitted by the send....

Also *some* TCP/IP stacks have a race condition that may come into play.

What is the use-case where a client would to the send() and immediately close???