Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Move structs and serialization to protobuf standard. #9
Currently packets are serialized and deserialized using .NET's binary formatter (Marshal.StructureToPtr) that reads/writes fields in order of declaration in given struct. It also keeps fields aligned to number of bytes specified by Pack variable.
This is not the best way to handle this since it's not easy to find out how fields are aligned, what is the byte order, how fields are stored, etc. Generally this is confusing - see this discussion for example.
We want to move to Protocol Buffers to use widely available serialization and data structure library that should be able to pack and unpack packets properly in all environments.
This was referenced
Jun 19, 2017
Seems sensible, perhaps you can confirm a few details..
1). You mentions on #4 that the old protocol will remain available (I guess at least for a while). Does this mean that the REQ packet requesting Headset or Controller will 'just' increase 'ProtocolVersion' and receive a different IP:Port to talk ProtoBuf at?
2). Protobuf does not (natively) support total message lengths, at least not for the Python implementation. Will the communications remain as one protobuf packet in each REQ/REP transaction?
3). Will you provide '.proto' files (rather than the C++ outputs) to enable easy porting to other languages?