When using recvfrom, the data should be copied back to the user provided buffer after psock_recvfrom, not before.