Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. pw::transport::internal::SocketFutureBase Class Reference
pw::transport::internal::SocketFutureBase Class Reference

Overview

Base class for socket-bound futures.

Inheritance diagram for pw::transport::internal::SocketFutureBase:
pw::transport::CloseFuture pw::transport::ReadFuture pw::transport::ReserveWriteFuture

Public Types

using List = async2::FutureList<&SocketFutureBase::core_ >
 

Public Member Functions

 SocketFutureBase (const SocketFutureBase &)=delete
 
SocketFutureBase & operator= (const SocketFutureBase &)=delete
 
 SocketFutureBase (SocketFutureBase &&other) noexcept
 
SocketFutureBase & operator= (SocketFutureBase &&other) noexcept
 
bool is_pendable () const
 
bool is_complete () const
 
void Wake ()
 

Protected Member Functions

 SocketFutureBase (SocketImpl &socket)
 
constexpr SocketFutureBase (async2::FutureState::Pending)
 
void RemoveFromSocket ()
 
IntrusivePtr< SocketImpl > Finish ()
 
void MarkCompletedWhenSocketUnbound ()
 
void StoreSocket (SocketImpl &socket)
 
void ClearSocket ()
 
void MoveSocket (SocketFutureBase &other)
 
SocketImpl * socket ()
 
const SocketImpl * socket () const
 
async2::FutureCore & core ()
 

Friends

class ::pw::transport::SocketImpl
 
class ::pw::transport::ReserveWriteFuture
 
class ::pw::transport::CloseFuture
 

Member Function Documentation

◆ MarkCompletedWhenSocketUnbound()

void pw::transport::internal::SocketFutureBase::MarkCompletedWhenSocketUnbound ( )
inlineprotected

Marks a future that is not bound to a socket (e.g. an immediately resolved future where socket_ == nullptr) as complete. Because the socket doubles as the lock provider, without one, lock safety analysis has to be disabled to access core_.


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