NNGMessage

{NNGMessage} Dynamically constructed structure to serialize everything for NNG transport Contains header and body buffers which may be composed and decomposed separately Properties: - pointer: to access internal nng_msg pointer - bodyptr: toaccess the body pointer - headerptr: to access the header pointer - lengthL message length - header_length: header length Methods: - constructor: accept the buffer size to allocate initially - body_append/body_prepend (template): add part to the body end or begin - body_chop (template): remove and return part from the end of body - body_trim (template): remove and return part from the beginnning of body - header_append/header_prepend (template): add part to the header end or begin - header_chop (template): remove and return part from the end of header - header_trim (template): remove and return part from the beginnning of header

Constructors

this
this(NNGMessage src)

Copy creator

this
this(nng_msg* msgref)

Copy creator based on internal message pointer

this
this(size_t size)

Creator? param: inition allocation size

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

body_append
int body_append(const(T) data)

Append ubyte array or unsigned to the body Returns zero or error code

body_chop
T body_chop(size_t size)

Extract and remove ubyte array of given size or unsigned from the body end Returns tempalte type

body_prepend
int body_prepend(const(T) data)

Prepend body with the ubyte array or unsigned Returns zero or error code

body_trim
T body_trim(size_t size)

Extract and remove ubyte array of given size or unsigned from the body beginning Returns template type

clear
void clear()

Clear message

header_append
int header_append(const(T) data)

For header same as for body

header_chop
T header_chop(size_t size)

For header same as for body

header_prepend
int header_prepend(const(T) data)

For header same as for body

header_trim
T header_trim(size_t size)

For header same as for body

Properties

bodyptr
void* bodyptr [@property getter]

Body pointer getter

headerptr
void* headerptr [@property getter]

Header pointer getter

length
size_t length [@property getter]

Message andheader length getters

pointer
nng_msg* pointer [@property getter]

Message pointer getter

pointer
nng_msg* pointer [@property setter]

Message pointer setter