I've been playing with C sockets recently, I managed to exchange files between a client and server. However I stumbled upon this problem: when sending the file size between my mac (64 bit) and a raspberry pi (32 bit), it fails since size_t
is different between the two. I solved by switching to uint64_t
.
- I'm wondering, is this a bad practice to use it in place of
size_t
, which is defined in all prototypes of fread(), fwrite(), read(), write(), stat.size? - Is
uint64_t
going to be slower on the raspberry pi?