Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. pw::rpc2::internal::ReserveRequestFutureBase< ReservationType > Class Template Reference
Loading...
Searching...
No Matches
pw::rpc2::internal::ReserveRequestFutureBase< ReservationType > Class Template Reference

Overview

template<typename ReservationType>
class pw::rpc2::internal::ReserveRequestFutureBase< ReservationType >

Shared implementation of RawUnaryReserveFuture and RawServerStreamReserveFuture. Resolves to ReservationType.

Inheritance diagram for pw::rpc2::internal::ReserveRequestFutureBase< ReservationType >:
pw::rpc2::ServerStreamReserveFuture< Response > pw::rpc2::UnaryReserveFuture< Response >

Public Types

using Reservation = ReservationType
 
using value_type = RpcResult< Reservation >
 

Public Member Functions

 ReserveRequestFutureBase (const ReserveRequestFutureBase &)=delete
 
ReserveRequestFutureBase & operator= (const ReserveRequestFutureBase &)=delete
 
bool is_pendable () const
 
bool is_complete () const
 
async2::Poll< value_type > Pend (async2::Context &cx)
 

Protected Member Functions

 ReserveRequestFutureBase (ReserveWriteFuture &&res_fut)
 
 ReserveRequestFutureBase (ReserveRequestFutureBase &&) noexcept=default
 
ReserveRequestFutureBase & operator= (ReserveRequestFutureBase &&) noexcept=default
 

Member Function Documentation

◆ Pend()

template<typename ReservationType >
async2::Poll< value_type > pw::rpc2::internal::ReserveRequestFutureBase< ReservationType >::Pend ( async2::Context &  cx)
inline

Polls for the request write reservation.

Returns
  • kOk with the reservation once buffer space is available.
  • kClosed if the client is empty or was closed.
  • kResourceExhausted if the call could not be allocated.
  • kMessageTooLarge if the requested size exceeds the maximum write size.
  • kDisconnected if the connection closed (or the client ran out of call IDs) before the reservation resolved, or kProtocolError if it closed because an endpoint broke the protocol. See Error handling.

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