Equity
Bitcoin Protocol Library
Public Member Functions | List of all members
P2p::VarString Class Reference

A variable-length string. More...

#include <Serialize.h>

Inheritance diagram for P2p::VarString:
P2p::Serializable

Public Member Functions

 VarString (std::string const &s)
 
 VarString (uint8_t const *&in, size_t &size)
 
std::string value () const
 Returns the bytes contained in the array.
 
Overrides Serializable
virtual void serialize (std::vector< uint8_t > &out) const override
 
virtual json toJson () const override
 

Detailed Description

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

Constructor & Destructor Documentation

P2p::VarString::VarString ( std::string const &  s)
inline
Parameters
sThe bytes to be contained in the array
P2p::VarString::VarString ( uint8_t const *&  in,
size_t &  size 
)
inline
Parameters
[in,out]inpointer to the next byte to deserialize
[in,out]sizenumber of bytes remaining in the serialized stream

The documentation for this class was generated from the following file: