Public Member Functions | List of all members
grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint Class Reference

#include <iomgr_engine.h>

Inheritance diagram for grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint:
Inheritance graph
[legend]

Public Member Functions

const ResolvedAddressGetLocalAddress () const override
 
const ResolvedAddressGetPeerAddress () const override
 
void Read (std::function< void(absl::Status)> on_read, SliceBuffer *buffer, const ReadArgs *args) override
 
void Write (std::function< void(absl::Status)> on_writable, SliceBuffer *data, const WriteArgs *args) override
 
 ~IomgrEndpoint () override
 
- Public Member Functions inherited from grpc_event_engine::experimental::EventEngine::Endpoint
virtual ~Endpoint ()=default
 

Detailed Description

Definition at line 47 of file iomgr_engine.h.

Constructor & Destructor Documentation

◆ ~IomgrEndpoint()

grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint::~IomgrEndpoint ( )
override

Member Function Documentation

◆ GetLocalAddress()

const ResolvedAddress& grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint::GetLocalAddress ( ) const
overridevirtual

◆ GetPeerAddress()

const ResolvedAddress& grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint::GetPeerAddress ( ) const
overridevirtual

Returns an address in the format described in DNSResolver. The returned values are expected to remain valid for the life of the Endpoint.

Implements grpc_event_engine::experimental::EventEngine::Endpoint.

◆ Read()

void grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint::Read ( std::function< void(absl::Status)>  on_read,
SliceBuffer buffer,
const ReadArgs args 
)
overridevirtual

Reads data from the Endpoint.

When data is available on the connection, that data is moved into the buffer, and the on_read callback is called. The caller must ensure that the callback has access to the buffer when executed later. Ownership of the buffer is not transferred. Valid slices may be placed into the buffer even if the callback is invoked with a non-OK Status.

There can be at most one outstanding read per Endpoint at any given time. An outstanding read is one in which the on_read callback has not yet been executed for some previous call to Read. If an attempt is made to call Read while a previous read is still outstanding, the EventEngine must abort.

For failed read operations, implementations should pass the appropriate statuses to on_read. For example, callbacks might expect to receive CANCELLED on endpoint shutdown.

Implements grpc_event_engine::experimental::EventEngine::Endpoint.

◆ Write()

void grpc_event_engine::experimental::IomgrEventEngine::IomgrEndpoint::Write ( std::function< void(absl::Status)>  on_writable,
SliceBuffer data,
const WriteArgs args 
)
overridevirtual

Writes data out on the connection.

on_writable is called when the connection is ready for more data. The Slices within the data buffer may be mutated at will by the Endpoint until on_writable is called. The data SliceBuffer will remain valid after calling Write, but its state is otherwise undefined. All bytes in data must have been written before calling on_writable unless an error has occurred.

There can be at most one outstanding write per Endpoint at any given time. An outstanding write is one in which the on_writable callback has not yet been executed for some previous call to Write. If an attempt is made to call Write while a previous write is still outstanding, the EventEngine must abort.

For failed write operations, implementations should pass the appropriate statuses to on_writable. For example, callbacks might expect to receive CANCELLED on endpoint shutdown.

Implements grpc_event_engine::experimental::EventEngine::Endpoint.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:40