Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

timeout_socket

A TCP/IP socket wrapper which has a built-in asynchronous timeout.

Synopsis

Defined in header <boost/beast/experimental/core/timeout_socket.hpp>

using timeout_socket = basic_timeout_socket< boost::asio::ip::tcp, boost::asio::io_context::executor_type >;
Types

Name

Description

executor_type

The type of the executor associated with the object.

lowest_layer_type

The type of the lowest layer.

next_layer_type

The type of the next layer.

protocol_type

The protocol used by the stream.

Member Functions

Name

Description

async_read_some

Start an asynchronous read.

async_write_some

Start an asynchronous write.

basic_timeout_socket

Constructor.

get_executor

Get the executor associated with the object.

lowest_layer

Get a reference to the lowest layer.

next_layer

Get a reference to the next layer.

This wraps a normal stream socket and implements a simple and efficient timeout for asynchronous read operations.

Remarks

Meets the requirements of AsyncReadStream and AsyncWriteStream


PrevUpHomeNext