xdrpp
RFC4506 XDR compiler and message library
Public Member Functions | Static Public Member Functions | List of all members
xdr::message_t Class Reference

Message buffer, with room at beginning for 4-byte length. More...

#include <message.h>

Public Member Functions

std::size_t size () const
 
char * data ()
 
const char * data () const
 
const uint32_t word (std::ptrdiff_t i) const
 
char * end ()
 End of the buffer (one past last byte).
 
const char * end () const
 
char * raw_data ()
 4-byte buffer to store size in network byte order, followed by data.
 
const char * raw_data () const
 
std::size_t raw_size () const
 Size of 4-byte length plus data.
 

Static Public Member Functions

static msg_ptr alloc (std::size_t size)
 Allocate a new buffer.
 

Detailed Description

Message buffer, with room at beginning for 4-byte length.

Note the constructor is private, so you must create one with message_t::alloc, which allocates more space than the size of the message_t structure. Hence message_t is just a data structure at the beginning of the buffer.

Definition at line 24 of file message.h.


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