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

Overview

Non-templated base class for Reader<Message> that closes the call's read side when destroyed so that any unread or future inbound messages are immediately discarded without blocking the connection task.

Inheritance diagram for pw::rpc2::internal::ReaderBase:
pw::rpc2::Reader< ConstBuf > pw::rpc2::Reader< Message >

Public Member Functions

 ReaderBase (const ReaderBase &)=delete
 
ReaderBase & operator= (const ReaderBase &)=delete
 
void Cancel ()
 

Protected Member Functions

 ReaderBase (ReaderBase &&) noexcept=default
 
ReaderBase & operator= (ReaderBase &&other) noexcept
 

Member Function Documentation

◆ Cancel()

void pw::rpc2::internal::ReaderBase::Cancel ( )
inline

Aborts the call immediately in both directions.

Sends a cancellation to the peer and completes the call locally with kCancelled: once any message already received has been read, a pending or later Read() on this end fails with kCancelled, as does any write through the call's Writer or UnaryWriter. No-op if the call has already ended. On a server, this is equivalent to cancelling through the call's writer.


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