Encodes and Decodes any type into a Packet object.
#include <nrg_codec.h>
Public Member Functions | |
size_t | encode (Packet &p, const T &data) |
Encodes data into p , and retuns the number of bytes written. | |
size_t | decode (Packet &p, T &data) |
Decodes bytes from p into data , returns the number of bytes read or 0 on error. | |