boost::corosio::native_local_stream_acceptor

Accepts Unix domain stream connections, calling the backend directly.

Synopsis

template<auto Backend>
class native_local_stream_acceptor
    : public local_stream_acceptor

Description

This class template inherits from local_stream_acceptor. It shadows both accept overloads (the peer‐reference form and the move‐return form) with versions that call the backend implementation directly. The compiler can then 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

Accepts inbound Unix domain stream connections, from a coroutine.

Types

Name

Description

handle

Owns a platform‐specific I/O implementation and destroys it when the handle goes out of scope.

implementation

Backends derive from this to implement accept, option, and lifecycle management.

io_service

Constructs, closes, and destroys platform implementations on behalf of an I/O object. Platform backends implement this interface.

Member Functions

Name

Description

native_local_stream_acceptor [constructor]

Constructors

operator=

Assignment operators

accept

accept overloads

assign

Assign an existing native socket to this acceptor.

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.

native_handle

Get the native socket handle.

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=

Assignment operators

Protected Static Member Functions

Name

Description

create_handle

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

reset_peer_impl

Install an accepted implementation into the peer socket.

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