An integer sent from one machine to another will preserve its value
regardless of the endianness of either machine. If you wish to attach
additional semantic meaning to that integer by using it to encode an ipv4
address then you need to take the appropriate steps to translate the local
value to and from network byte order, the same as you would for an int32
that was not part of a protobuf.

On Sat, Oct 21, 2023 at 1:48 AM Kumar bhat <[email protected]> wrote:

> What happens if a uint32_t is sent from little endian system and received
> by bit endian system. For eg: An Ipv4 address. Can we send the IP address
> in any byte order and be able to see the same value in receiver of a
> different endian machine? If thats the case, I dont see any documentation
> for the same.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/e9b8b750-3fe3-4f65-b5ab-4664f791568bn%40googlegroups.com
> <https://groups.google.com/d/msgid/protobuf/e9b8b750-3fe3-4f65-b5ab-4664f791568bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CABV2wQXaZMhCKFQ-Srq%3DCbbYriH_M5u3j_YjYyjX94E98QHF0g%40mail.gmail.com.

Reply via email to