...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Stream wrapper to process Shoutcast HTTP responses.
Defined in header <boost/beast/_experimental/http/icy_stream.hpp>
template< class NextLayer> class icy_stream
Name |
Description |
---|---|
The type of the executor associated with the object. |
|
The type of the next layer. |
Name |
Description |
---|---|
Start an asynchronous read. |
|
Start an asynchronous write. |
|
Get the executor associated with the object. |
|
icy_stream [constructor] |
|
Get a reference to the next layer. |
|
Read some data from the stream. |
|
Write some data to the stream. |
|
~icy_stream [destructor] |
Destructor. |
This wrapper replaces the word "ICY" in the first HTTP response received on the connection, with "HTTP/1.1". This allows the Beast parser to be used with Shoutcast servers, which send a non-standard HTTP message as the response.
For asynchronous operations, the application must ensure that they are are all performed within the same implicit or explicit strand.
Distinctobjects:Safe.
Sharedobjects:Unsafe. The application must also ensure that all asynchronous operations are performed within the same implicit or explicit strand.
To use the icy_stream
template with an tcp_stream
you would write:
http::icy_stream<tcp_stream> is(ioc);
Type |
Description |
---|---|
|
The type representing the next layer, to which data will be read and written during operations. For synchronous operations, the type must support the SyncStream concept. For asynchronous operations, the type must support the AsyncStream concept. |
A stream object must not be moved or destroyed while there are pending asynchronous operations associated with it.