Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

posix::descriptor_base::descriptor_name

I/O control command to name a descriptor.

typedef implementation_defined descriptor_name;
Types

Name

Description

container

Determine the container for the specified elements.

rebind

Rebind the traits to a new set of signatures.

receive_cancelled_signature

The signature of a channel cancellation notification.

receive_closed_signature

The signature of a channel closed notification.

Member Functions

Name

Description

invoke_receive_cancelled [static]

Invoke the specified handler with a cancellation notification.

invoke_receive_closed [static]

Invoke the specified handler with a closed notification.

Implements a custom I/O control command that gives the descriptor a name. Whether the name is used is backend-dependent. It is currently used by the spin reactor, to look up per-descriptor configuration. The name is not required to be unique.

Remarks

The string is stored by pointer in the I/O control command object, so the caller must ensure that it is valid across the call to io_control.

Example
boost::asio::posix::stream_descriptor d(my_context, fd);
...
boost::asio::posix::descriptor_base::descriptor_name name("xyzzy");
d.io_control(name);

With a string configuration, specified via config_from_string:

reactor.descriptors.xyzzy.priority=10
reactor.descriptors.xyzzy.interval=4
reactor.descriptors.xyzzy.offset=1
Requirements

Header: boost/asio/posix/descriptor_base.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext