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 ( )
virtualdefaultnoexcept

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
valueThe value to write to the replies feed.
Exceptions
RpcBrokenPipeExceptionif the communication with the client breaks.
RpcTimeoutExceptionif the operation needs to block for a time longer than the configured timeout.
RpcFeedCancelledExceptionif 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
valueThe value to write to the replies feed.
Exceptions
RpcBrokenPipeExceptionif the communication with the client breaks.
RpcTimeoutExceptionif the operation needs to block for a time longer than the configured timeout.
RpcFeedCancelledExceptionif the client cancels the output feed.

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