bytes_total = ntohl(chunk_len_pkt.as<uint32_t>()); with my latest commit :D