title: Facing an issue with recv() and send() winsock api. Recv() hangs while receving the last packet
body: <p>I am facing an issue with recv() and send() winsock api. Recv() hangs while receving the last packet.</p>
  
  <p>Problem Description:-</p>
  
  <p>System A's app is writing data over a non-blocking socket and system B's app is receiving data over a blocking socket in chunks of 64k.</p>
  
  <p>It seems that while reading probably the last packet of 64k, which may less than or equal to 64k, the receive freezes. I am not sure if the receive of the last packet or send of the last packet is an issue, but I am observing this issue intermittently in our legacy applications.</p>
  
  <p>Has anyone faced a similar issue before? If yes, then can please provide your inputs.</p>
  
  <p>If not, then can you please provide some trouble-shooting techniques to narrow down to the root cause.</p>
  
  <p>Just for information I have win2k3 servers.</p>
  
  <p>Thanks,
  Varun</p>