Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Add endian awareness to the protocol #28

@Zepheus

Description

@Zepheus

Right now, most of the message serialization uses memcpy directly to construct the over-the-wire payload.

Whenever these structures include integers, they are implicitly encoded in the machine's endianness. This will cause a binary incompatibility on machines that do not provide flexible endianness per process (e.g. MIPS?)

We should abstract this away using helper functions from the htons, htonl, ntohs, ntohl family.
Alternatively, we could use flatbuffers and gate this under protocol negotiations. This would greatly speed up adding message types in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions