Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. pw::transport::internal::TransportFuture< Derived, SocketType > Class Template Reference
pw::transport::internal::TransportFuture< Derived, SocketType > Class Template Reference

Overview

template<typename Derived, typename SocketType>
class pw::transport::internal::TransportFuture< Derived, SocketType >

Common future implementation for Listener and Connector futures.

Public Types

using value_type = Result< SocketType >
 

Public Member Functions

 TransportFuture (const TransportFuture &)=delete
 
TransportFuture & operator= (const TransportFuture &)=delete
 
void Cancel ()
 Cancels the future.
 
bool is_pendable () const
 Returns true if the future can be pended.
 
bool is_complete () const
 Returns true if the future has completed.
 
async2::Poll< value_type > Pend (async2::Context &cx)
 Polls the future, returning the socket once the connection completes.
 

Static Public Member Functions

static Derived Resolved (value_type &&result)
 Creates a future that is immediately resolved with result.
 
static Derived Resolved (const value_type &result)
 Creates a future that is immediately resolved with result.
 

Protected Member Functions

 TransportFuture (TransportFuture &&) noexcept=default
 
TransportFuture & operator= (TransportFuture &&) noexcept=default
 
 TransportFuture (async2::ValueFuture< Result< Socket > > &&future) noexcept
 
async2::ValueFuture< Result< Socket > > && TakeFuture () &&noexcept
 

Friends

class TransportFutureProvider< Derived >
 
class TransportFutureListProvider< Derived >
 

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