boost::corosio::native_local_stream_acceptor

An asynchronous Unix stream acceptor with devirtualized accept.

Synopsis

template<auto Backend>
class native_local_stream_acceptor
    : public local_stream_acceptor

Description

This class template inherits from local_stream_acceptor and shadows both accept overloads (the peer‐reference form and the move‐return form) with versions that call the backend implementation directly, allowing the compiler to inline through the entire call chain. The move‐return form yields a native_local_stream_socket so subsequent I/O on the peer is also devirtualized.

Non‐async operations (listen, close, cancel) remain unchanged and dispatch through the compiled library.

A native_local_stream_acceptor IS‐A local_stream_acceptor and can be passed to any function expecting local_stream_acceptor&.

Thread Safety

Base Classes

Name Description

local_stream_acceptor

An asynchronous Unix domain stream acceptor for coroutine I/O.

Types

Name

Description

handle

RAII wrapper for I/O object implementation lifetime.

implementation

Backend hooks for local stream acceptor operations.

io_service

Service interface for I/O object lifecycle management.

Member Functions

Name

Description

native_local_stream_acceptor [constructor] [deleted]

Constructors

operator= [deleted]

Assignment operators

accept

accept overloads

bind

Bind to a local endpoint.

cancel

Cancel pending asynchronous accept operations.

close

Close the acceptor.

context

Return the execution context.

get_option

Get a socket option from the acceptor.

is_open

Check if the acceptor has an open socket handle.

listen

Start listening for incoming connections.

local_endpoint

Return the local endpoint the acceptor is bound to.

open

Create the acceptor socket.

release

Release ownership of the native socket handle.

set_option

Set a socket option on the acceptor.

wait

Asynchronously wait for the acceptor to be ready.

Protected Member Functions

Name

Description

operator= [deleted]

Move assign from another I/O object.

Protected Static Member Functions

Name

Description

create_handle

Create a handle bound to a service found in the context.

reset_peer_impl

Protected Data Members

Name

Description

h_

The platform I/O handle owned by this object.

Template Parameters

Name Description

Backend

A backend tag value (e.g., epoll).

See Also

local_stream_acceptor, epoll_t, iocp_t

Created with MrDocs