eRPC
Public Member Functions | List of all members
erpc::MsgBuffer Class Reference

Applications store request and response messages in hugepage-backed buffers called message buffers. These buffers are registered with the NIC, allowing fast zero-copy transmission. More...

#include <msg_buffer.h>

Public Member Functions

size_t get_data_size () const
 

Detailed Description

Applications store request and response messages in hugepage-backed buffers called message buffers. These buffers are registered with the NIC, allowing fast zero-copy transmission.

A message buffer is allocated using Rpc::alloc_msg_buffer. Only its maximum size is specified during allocation. Later, users can resize the message buffer with Rpc::resize_msg_buffer to fit smaller requests or responses. Rpc::free_msg_buffer frees a message buffer.

A message buffer is invalid if its buf pointer is null.

Member Function Documentation

◆ get_data_size()

size_t erpc::MsgBuffer::get_data_size ( ) const
inline

Return the current amount of data in this message buffer. This can be smaller than it's maximum data capacity due to resizing.

Member Data Documentation

◆ buf

uint8_t* erpc::MsgBuffer::buf

Pointer to the first application data byte. The message buffer is invalid invalid if this is null.


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