|
iceoryx2
C++ Language Bindings
|
#include <active_request.hpp>
Public Member Functions | |
| ActiveRequest (ActiveRequest &&rhs) noexcept | |
| auto | operator= (ActiveRequest &&rhs) noexcept -> ActiveRequest & |
| ~ActiveRequest () noexcept | |
| ActiveRequest (const ActiveRequest &)=delete | |
| auto | operator= (const ActiveRequest &) noexcept -> ActiveRequest &=delete |
| template<typename T = ResponsePayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_uninit () -> bb::Expected< ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >, LoanError > |
Loans uninitialized memory for a [ResponseMutUninit] where the user can write its payload to. | |
| template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_slice_uninit (uint64_t number_of_elements) -> bb::Expected< ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >, LoanError > |
Loans uninitialized memory for a [ResponseMutUninit] where the user can write its payload to. | |
| template<typename T = RequestPayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | send_copy (const ResponsePayload &payload) const -> bb::Expected< void, SendError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | send_slice_copy (const bb::ImmutableSlice< ValueType > &payload) const -> bb::Expected< void, SendError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | payload () const -> const T & |
Returns a reference to the payload of the received [RequestMut]. | |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | payload () const -> bb::ImmutableSlice< ValueType > |
Returns a reference to the payload of the received [RequestMut]. | |
| template<typename T = RequestUserHeader, typename = std::enable_if_t<!std::is_same<void, RequestUserHeader>::value, T>> | |
| auto | user_header () const -> const T & |
Returns a reference to the user_header of the received [RequestMut]. | |
| auto | header () const -> RequestHeader |
Returns a reference to the [RequestHeader] of the received [RequestMut]. | |
| auto | origin () const -> UniqueClientId |
Returns the [UniqueClientId] of the [Client]. | |
| auto | is_connected () const -> bool |
| auto | has_disconnect_hint () const -> bool |
| template<typename T = ResponsePayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | loan () -> bb::Expected< ResponseMut< Service, ResponsePayload, ResponseUserHeader >, LoanError > |
| template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_slice (uint64_t number_of_elements) -> bb::Expected< ResponseMut< Service, ResponsePayload, ResponseUserHeader >, LoanError > |
Friends | |
| template<ServiceType , typename , typename , typename , typename > | |
| class | Server |
Represents a one-to-one connection to a [Client] holding the corresponding [PendingResponse] that is coupled with the [RequestMut] the [Client] sent to the [Server]. The [Server] will use it to send arbitrary many [Response]s.
Definition at line 36 of file active_request.hpp.
|
inlinenoexcept |
Definition at line 122 of file active_request.hpp.
|
inlinenoexcept |
Definition at line 148 of file active_request.hpp.
|
delete |
|
inline |
Returns [true] if the [Client] wants to gracefully disconnect. This allows the [Server] to send its last response and then drop the [ActiveRequest] to signal the [Client] that no more [ResponseMut] will be sent.
Definition at line 326 of file active_request.hpp.
|
inline |
Returns a reference to the [RequestHeader] of the received [RequestMut].
Definition at line 291 of file active_request.hpp.
Referenced by iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::origin().
|
inline |
Returns [true] until the [PendingResponse] goes out of scope on the [Client] side indicating that the [Client] no longer receives the [ResponseMut].
Definition at line 315 of file active_request.hpp.
|
inline |
Loans default initialized memory for a [ResponseMut] where the user can write its payload to.
Definition at line 337 of file active_request.hpp.
References iox2::assume_init(), iox2::bb::err(), and iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan_uninit().
|
inline |
Loans default initialized memory for a [ResponseMut] where the user can write its payload to.
Definition at line 354 of file active_request.hpp.
References iox2::assume_init(), iox2::bb::err(), and iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan_slice_uninit().
|
inline |
Loans uninitialized memory for a [ResponseMutUninit] where the user can write its payload to.
Definition at line 180 of file active_request.hpp.
References iox2::bb::err(), and iox2::internal::PlacementDefault< T >::placement_default().
Referenced by iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan_slice().
|
inline |
Loans uninitialized memory for a [ResponseMutUninit] where the user can write its payload to.
Definition at line 160 of file active_request.hpp.
References iox2::bb::err(), and iox2::internal::PlacementDefault< T >::placement_default().
Referenced by iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan().
|
inlinenoexcept |
Definition at line 132 of file active_request.hpp.
|
deletenoexcept |
|
inline |
Returns the [UniqueClientId] of the [Client].
Definition at line 304 of file active_request.hpp.
| auto iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::payload | ( | ) | const -> bb::ImmutableSlice< ValueType > |
Returns a reference to the payload of the received [RequestMut].
|
inline |
Returns a reference to the payload of the received [RequestMut].
Definition at line 240 of file active_request.hpp.
Referenced by iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::send_copy(), and iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::send_slice_copy().
|
inline |
Sends a copy of the provided data to the [PendingResponse] of the corresponding [Client]. This is not a zero-copy API. Use [ActiveRequest::loan_uninit()] instead.
Definition at line 199 of file active_request.hpp.
References iox2::bb::err(), and iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::payload().
|
inline |
Sends a copy of the provided data to the [PendingResponse] of the corresponding [Client]. This is not a zero-copy API. Use [ActiveRequest::loan_slice_uninit()] instead.
Definition at line 220 of file active_request.hpp.
References iox2::bb::err(), and iox2::ActiveRequest< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::payload().
|
inline |
Returns a reference to the user_header of the received [RequestMut].
Definition at line 278 of file active_request.hpp.
|
friend |
Definition at line 108 of file active_request.hpp.