Kea: isc::dhcp_ddns::UDPCallback::Data Struct Reference

| Kea 3.0.2-git

isc::dhcp_ddns::UDPCallback::Data Struct Reference

Container class which stores service invocation related data. More...

`#include <ncr_udp.h>`

## Public Member Functions
| Data (RawBufferPtr &buffer, const size_t buf_size, UDPEndpointPtr &data_source)
| Constructor.

## Public Attributes
size_t | buf_size_
| Storage capacity of the buffer.
RawBufferPtr | buffer_
| A pointer to the data transfer buffer.
size_t | bytes_transferred_
| Stores the number of bytes transferred by completed IO service.
UDPEndpointPtr | data_source_
| The UDP endpoint that is the origin of the data transferred.
boost::system::error_code | error_code_
| Stores the IO layer result code of the completed IO service.
size_t | put_len_
| Stores this size of the data within the buffer when written there manually.

## Detailed Description

Container class which stores service invocation related data.

Because the callback object may be copied numerous times during the course of service invocation, it does not directly contain data values. Rather it will retain a shared pointer to an instance of this structure thus ensuring that all copies of the callback object, ultimately refer to the same data values.

Definition at line 156 of file ncr_udp.h.

## Constructor & Destructor Documentation

## ◆ Data()

isc::dhcp_ddns::UDPCallback::Data::Data | ( | RawBufferPtr & | buffer,
|  | const size_t | buf_size,
|  | UDPEndpointPtr & | data_source )
| inline

Constructor.

Parameters

  buffer | is a pointer to the data transfer buffer. This is the buffer data will be written to on a read, or read from on a send.
  buf_size | is the capacity of the buffer
  data_source | storage for UDP endpoint which supplied the data

Definition at line 165 of file ncr_udp.h.

References buf_size_, buffer_, bytes_transferred_, data_source_, error_code_, and put_len_.

## Member Data Documentation

## ◆ buf_size_

size_t isc::dhcp_ddns::UDPCallback::Data::buf_size_

Storage capacity of the buffer.

Definition at line 174 of file ncr_udp.h.

Referenced by Data().

## ◆ buffer_

RawBufferPtr isc::dhcp_ddns::UDPCallback::Data::buffer_

A pointer to the data transfer buffer.

Definition at line 171 of file ncr_udp.h.

Referenced by Data().

## ◆ bytes_transferred_

size_t isc::dhcp_ddns::UDPCallback::Data::bytes_transferred_

Stores the number of bytes transferred by completed IO service.

For a read it is the number of bytes written into the buffer. For a write it is the number of bytes read from the buffer.

Definition at line 191 of file ncr_udp.h.

Referenced by Data().

## ◆ data_source_

UDPEndpointPtr isc::dhcp_ddns::UDPCallback::Data::data_source_

The UDP endpoint that is the origin of the data transferred.

Definition at line 177 of file ncr_udp.h.

Referenced by Data().

## ◆ error_code_

boost::system::error_code isc::dhcp_ddns::UDPCallback::Data::error_code_

Stores the IO layer result code of the completed IO service.

Definition at line 184 of file ncr_udp.h.

Referenced by Data().

## ◆ put_len_

size_t isc::dhcp_ddns::UDPCallback::Data::put_len_

Stores this size of the data within the buffer when written there manually.

(See UDPCallback::putData()) .

Definition at line 181 of file ncr_udp.h.

Referenced by Data().

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

- ncr_udp.h