Cast uint64_t from socket to size_t