Manages inbound receives over an io_uring‐backed socket.

Synopsis

Declared in <folly/io/async/IoUringRecv.h>

class IoUringRecvHandle
    : public DelayedDestruction

Base Classes

Name

Description

DelayedDestruction

DelayedDestruction is a helper class to ensure objects are not deleted while they still have functions executing in a higher stack frame.

Types

Name

Description

Destructor

Helper class to allow DelayedDestruction classes to be used with std::shared_ptr.

DestructorGuard

Classes should create a DestructorGuard object on the stack in any function that may invoke callback functions.

IntrusivePtr

This smart pointer is a convenient way to manage a concrete DelayedDestructorBase child. It can replace the equivalent raw pointer and provide automatic memory management.

Type Aliases

Name

Description

PendingRead

A future that resolves to a received buffer.

PendingReadMaybe

An optional pending read, empty when no read is outstanding.

UniquePtr

Owning pointer type that respects DelayedDestruction semantics.

Member Functions

Name

Description

operator= [deleted]

Deleted copy assignment operator.

cancel

Cancels any outstanding receive.

destroy [virtual]

destroy() requests destruction of the object.

detachEventBase

Detaches the handle from its current EventBase.

drainCompletedReads

Delivers any reads that have already completed.

getDestroyPending

Returns whether destruction has been requested but deferred.

submit

Submits a receive request to the io_uring ring.

update

Updates the event flags the handle is registered for.

Static Member Functions

Name

Description

clone

Creates a new receive handle that takes over the state of another.

create

Creates a receive handle bound to the given socket.

Protected Member Functions

Name

Description

getDestructorGuardCount

Get the number of DestructorGuards currently protecting this object.

onDelayedDestroy [virtual]

Implement onDelayedDestroy in subclasses. onDelayedDestroy() is invoked when the object is potentially being destroyed.

Created with MrDocs