initialize the client pointer before looping
If the client initialization fails, then leave
Use uint32_t * instead of casting that to unsigned char * as sendto/recvfrom can send a void *