pn_raw_buffer_t Struct Reference
[Raw connection]

A descriptor used to represent a single raw buffer in memory. More...

#include <raw_connection.h>

List of all members.

Public Attributes

uintptr_t context
 Used to associate arbitrary application data with this raw buffer.
char * bytes
 Pointer to the start of the raw buffer, if this is null then no buffer is represented.
uint32_t capacity
 Count of available bytes starting at bytes.
uint32_t size
 Number of bytes read or to be written starting at offset.
uint32_t offset
 First byte in the buffer to be read or written.

Detailed Description

A descriptor used to represent a single raw buffer in memory.

Note:
The intent of the offset is to allow the actual bytes being read/written to be at a variable location relative to the head of the buffer because of other data or structures that are important to the application associated with the data to be written but not themselves read/written to the connection.
For read buffers: When read buffers are returned to the application size will be the number of bytes read. Read operations will not change the context, bytes or capacity members of the structure.
For write buffers: When write buffers are returned to the application all of the struct members will be returned unaltered. Also write operations will not modify the bytes of the buffer passed in at all. In principle this means that the write buffer can be used for multiple writes at the same time as long as the actual buffer is unmodified by the application at any time the buffer is being used by any raw connection.

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

Generated on 2 Oct 2020 for Qpid Proton C by  doxygen 1.6.1