Skip to main content
reference

Buffer

namespace: privmx::endpoint::core

Buffer provides simple string buffer implementation.

Static Methods

from

Creates Buffer from `std::string`.

static Buffer from(
const std::string &str
)

NameTypeDescription
strconst std::string &string to convert to Buffer

TypeDescription
Buffer Buffer object

from

Creates Buffer from `char*`.

static Buffer from(
const char *data
std::size_t size
)

NameTypeDescription
dataconst char *the char* to convert to Buffer
sizestd::size_tdata length

TypeDescription
Buffer Buffer object

Methods

stdString

Gets data as `std::string` from Buffer

const std::string & stdString() const

TypeDescription
const std::string & data as std::string

stdString

Gets data as `std::string` from Buffer

std::string & stdString()

TypeDescription
std::string & data as std::string

size

Gets Buffer data size.

std::size_t size() const

TypeDescription
std::size_t data size

data

Gets data as char* from Buffer

const char * data() const

TypeDescription
const char * data as char*