The reason is the third parameter of the recv call. It should be the buffer length, but you used strlen(buffer), which is always 0. That's why your client keeps printing Received nothing.
recv
strlen(buffer)
0
Received nothing.