Specialisation of Codec for std::string objects.
#include <nrg_codec.h>
Public Member Functions | |
size_t | encode (Packet &p, const std::string &str) |
Encodes data into p by prefixing the string with its length as a Varint. | |
size_t | decode (Packet &p, std::string &str) |
Decodes bytes from p into data , returns the number of bytes read or 0 on error. | |