| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
RpcServerWriter< T > Class Template Referenceabstract

An interface for a server-side RPC writer. More...

`#include <RpcServerWriter.hpp>`

## Public Member Functions

virtual | ~RpcServerWriter () noexcept=default
| Destructor.
virtual void | write (const T &value)=0
| Copy write operation.
virtual void | write (T &&value)=0
| Move write operation.

## Detailed Description

template<typename T>
class eprosima::fastdds::dds::rpc::RpcServerWriter< T >

An interface for a server-side RPC writer.

Would be used to write replies from a server on an operation with a @feed annotated return type.

## Constructor & Destructor Documentation

## ◆ ~RpcServerWriter()

template<typename T>

virtual ~RpcServerWriter | ( |  | ) |

virtual default noexcept

Destructor.

## Member Function Documentation

## ◆ write() [1/2]

template<typename T>

virtual void write | ( | const T & | value | ) |

pure virtual

Copy write operation.

Will add a value to the replies feed, that would be eventually sent to the client. May block depending on the configured queue sizes in both the client and the server.

Parameters

  value | The value to write to the replies feed.

Exceptions

  RpcBrokenPipeException | if the communication with the client breaks.
  RpcTimeoutException | if the operation needs to block for a time longer than the configured timeout.
  RpcFeedCancelledException | if the client cancels the output feed.

## ◆ write() [2/2]

template<typename T>

virtual void write | ( | T && | value | ) |

pure virtual

Move write operation.

Will add a value to the replies feed, that would be eventually sent to the client. May block depending on the configured queue sizes in both the client and the server.

Parameters

  value | The value to write to the replies feed.

Exceptions

  RpcBrokenPipeException | if the communication with the client breaks.
  RpcTimeoutException | if the operation needs to block for a time longer than the configured timeout.
  RpcFeedCancelledException | if the client cancels the output feed.

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

- include/fastdds/dds/rpc/interfaces/RpcServerWriter.hpp