Add pb_en/decode_nullterminated() (part of #278)
Nanopb has traditionally supported messages to be terminated with a zero tag. However, this is not really standard protobuf behaviour, so it makes sense to separate it into a different function. Because it is a breaking change, it will happen in 0.4.0 release. But I add the functions here early so that new code can start using them now. Also changed the network_server example to use en/decode_delimited(), which is the more common protobuf method of simple message framing.
Showing
- examples/network_server/client.c 2 additions, 6 deletionsexamples/network_server/client.c
- examples/network_server/server.c 6 additions, 2 deletionsexamples/network_server/server.c
- pb_decode.c 6 additions, 0 deletionspb_decode.c
- pb_decode.h 7 additions, 0 deletionspb_decode.h
- pb_encode.c 10 additions, 0 deletionspb_encode.c
- pb_encode.h 6 additions, 0 deletionspb_encode.h
Loading
Please register or sign in to comment