C/C++ API Reference
Loading...
Searching...
No Matches
pw::channel::AnyPacketChannel< T > Class Template Referenceabstract

Overview

template<typename T>
class pw::channel::AnyPacketChannel< T >

PacketChannel that optionally supports reading and writing. Generally, prefer PacketChannel, which expresses readability and writability in the type.

Warning
This class is in an early, experimental state. Do not use it until this warning is removed (https://pwbug.dev/421962771).
Inheritance diagram for pw::channel::AnyPacketChannel< T >:
pw::channel::PacketChannel< T, kReadable > pw::channel::PacketChannel< T, kWritable > pw::channel::PacketChannel< T, kReadable, kWritable > pw::channel::internal::BasePacketChannelImpl< Packet, kReadable > pw::channel::internal::BasePacketChannelImpl< Packet, kReadable, kWritable > pw::channel::internal::BasePacketChannelImpl< Packet, kWritable > pw::channel::internal::PacketChannelImpl< Packet, kReadable > pw::channel::internal::PacketChannelImpl< Packet, kReadable, kWritable > pw::channel::internal::PacketChannelImpl< Packet, kWritable >

Public Types

using Packet = T
 

Public Member Functions

constexpr bool readable () const
 Returns whether the channel implementation is readable.
 
constexpr bool writable () const
 Returns whether the channel implementation is writable.
 
constexpr bool is_read_open () const
 
constexpr bool is_write_open () const
 
constexpr bool is_read_or_write_open () const
 True if the channel is open for either reading or writing.
 
async2::PollResult< Packet > PendRead (async2::Context &cx)
 
async2::PollResult< PendingWrite< Packet > > PendReadyToWrite (async2::Context &cx, size_t num=1)
 
async2::Poll PendWrite (async2::Context &cx)
 
void SetAvailableWrites (uint16_t available_writes)
 
void AcknowledgeWrites (uint16_t num_completed)
 
async2::Poll< StatusPendClose (async2::Context &cx)
 

Protected Member Functions

uint16_t GetAvailableWrites () const
 
void set_read_closed ()
 
void set_write_closed ()
 
void set_read_write_closed ()
 
async2::Wakerwrite_waker ()
 Allows implementations to access the write waker.
 

Friends

template<typename , Property... >
class PacketChannel
 
template<typename , Property... >
class internal::BasePacketChannelImpl
 

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