A variable-length string.
More...
#include <Serialize.h>
|
| VarString (std::string const &s) |
|
| VarString (uint8_t const *&in, size_t &size) |
|
std::string | value () const |
| Returns the bytes contained in the array.
|
|
|
virtual void | serialize (std::vector< uint8_t > &out) const override |
|
virtual json | toJson () const override |
|
A variable-length string.
This is primarily used for serialization of a string along with the number of characters in the string.
- See also
- VASize
P2p::VarString::VarString |
( |
std::string const & |
s | ) |
|
|
inline |
- Parameters
-
s | The bytes to be contained in the array |
P2p::VarString::VarString |
( |
uint8_t const *& |
in, |
|
|
size_t & |
size |
|
) |
| |
|
inline |
- Parameters
-
[in,out] | in | pointer to the next byte to deserialize |
[in,out] | size | number of bytes remaining in the serialized stream |
The documentation for this class was generated from the following file: