| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
SenderResource Class Reference
eProsima Fast DDS API Reference » RTPS » Network Module

RAII object that encapsulates the Send operation over one chanel in an unknown transport. More...

`#include <SenderResource.hpp>`

## Public Types

using | NetworkBuffer = eprosima::fastdds::rtps::NetworkBuffer

## Public Member Functions

bool | send (const std::vector< NetworkBuffer > &buffers, const uint32_t &total_bytes, LocatorsIterator *destination_locators_begin, LocatorsIterator *destination_locators_end, const std::chrono::steady_clock::time_point &max_blocking_time_point)
| Sends to a destination locator, through the channel managed by this resource.
| SenderResource (SenderResource &&rValueResource)
| Resources can only be transfered through move semantics.
virtual | ~SenderResource ()=default
int32_t | kind () const
virtual void | add_locators_to_list (LocatorList_t &locators) const
| Add locators representing the local endpoints managed by this sender resource.

## Protected Member Functions

| SenderResource (int32_t transport_kind)

## Protected Attributes

int32_t | transport_kind_
std::function< void()> | clean_up
std::function< bool(const std::vector< NetworkBuffer > &, uint32_t, LocatorsIterator *destination_locators_begin, LocatorsIterator *destination_locators_end, const std::chrono::steady_clock::time_point &)> | send_buffers_lambda_

## Detailed Description

RAII object that encapsulates the Send operation over one chanel in an unknown transport.

A Sender resource is always univocally associated to a transport channel; the act of constructing a Sender Resource opens the channel and its destruction closes it.

## Member Typedef Documentation

## ◆ NetworkBuffer

using NetworkBuffer = eprosima::fastdds::rtps::NetworkBuffer

## Constructor & Destructor Documentation

## ◆ SenderResource() [1/2]

SenderResource | ( | SenderResource && | rValueResource | ) |

inline

Resources can only be transfered through move semantics.

Copy, assignment, and construction outside of the factory are forbidden.

## ◆ ~SenderResource()

virtual ~SenderResource | ( |  | ) |

virtual default

## ◆ SenderResource() [2/2]

SenderResource | ( | int32_t | transport_kind | ) |

inline protected

## Member Function Documentation

## ◆ add_locators_to_list()

virtual void add_locators_to_list | ( | LocatorList_t & | locators | ) | const

inline virtual

Add locators representing the local endpoints managed by this sender resource.

Parameters

  [in,out] | locators | List where locators will be added.

## ◆ kind()

int32_t kind | ( |  | ) | const

inline

## ◆ send()

bool send | ( | const std::vector< NetworkBuffer > & | buffers,
|  | const uint32_t & | total_bytes,
|  | LocatorsIterator * | destination_locators_begin,
|  | LocatorsIterator * | destination_locators_end,
|  | const std::chrono::steady_clock::time_point & | max_blocking_time_point )

inline

Sends to a destination locator, through the channel managed by this resource.

Parameters

  buffers | Vector of buffers to send.
  total_bytes | Length of all buffers to be sent. Will be used as a boundary for the previous parameter.
  destination_locators_begin | destination endpoint Locators iterator begin.
  destination_locators_end | destination endpoint Locators iterator end.
  max_blocking_time_point | If transport supports it then it will use it as maximum blocking time.

Returns
  Success of the send operation.

## Member Data Documentation

## ◆ clean_up

std::function<void()> clean_up

protected

## ◆ send_buffers_lambda_

std::function<bool( const std::vector<NetworkBuffer>&, uint32_t, LocatorsIterator* destination_locators_begin, LocatorsIterator* destination_locators_end, const std::chrono::steady_clock::time_point&)> send_buffers_lambda_

protected

## ◆ transport_kind_

int32_t transport_kind_

protected

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

- include/fastdds/rtps/transport/SenderResource.hpp