boost::asio::basic_stream_socket
Provides stream‐oriented socket functionality.
Synopsis
Declared in <boost/asio/basic_stream_socket.hpp>
template<
typename Protocol,
typename Executor = any_io_executor>
class basic_stream_socket
: public basic_socket<Protocol, Executor>
Types
Name |
Description |
Rebinds the socket type to another executor. |
|
The endpoint type. |
|
The type of the executor associated with the object. |
|
The protocol type. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroys the socket. |
Assignment operators |
|
Start an asynchronous read. |
|
Start an asynchronous receive. |
|
Start an asynchronous send. |
|
Start an asynchronous write. |
|
Read some data from the socket. |
|
|
|
Send some data on the socket. |
|
Write some data to the socket. |
Non-Member Functions
Name |
Description |
Asynchronously establishes a socket connection by trying each endpoint in a sequence. |
|
Asynchronously establishes a socket connection by trying each endpoint in a sequence. |
|
Asynchronously establishes a socket connection by trying each endpoint in a sequence. |
|
Asynchronously establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Establishes a socket connection by trying each endpoint in a sequence. |
|
Create a pair of connected sockets. |
|
Create a pair of connected sockets. |
Description
The basic_stream_socket class template provides asynchronous and blocking stream‐oriented socket functionality.
Thread Safety
Distinct objects: Safe. Shared objects: Unsafe.
Synchronous send, receive, connect, and shutdown operations are thread safe with respect to each other, if the underlying operating system calls are also thread safe. This means that it is permitted to perform concurrent calls to these synchronous operations on a single socket object. Other synchronous operations, such as open or close, are not thread safe.
Concepts:
AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
Created with MrDocs