| Home | Libraries | People | FAQ | More

#### StreamType concept

`StreamType` represents the transport protocol type used to transfer stream of bytes.

`StreamType` should meet the AsyncStream concept.

| Note
Because `boost::beast::websocket::stream<NextLayer>` does not satisfy `AsyncWriteStream`, requirements were relaxed to allow a stream to provide `async_write` operation instead of `async_write_some`. With `ConstBufferSequence` cb and CompletionToken t, `s.async_write(cb, t)` should meet the requirements of an asynchronous operation with the completion signature `void(error_code ec, size_t n)` and should write all the supplied data to the stream.

It should follow Asio's layered stream model by having a `lowest_layer_type` member type, and a `lowest_layer` member function, returing a `lowest_layer_type&`. The `lowest_layer_type` should inherit from `boost::asio::ip::tcp::socket`.

Additionally, it should have an overload of async_shutdown function that is discoverable via argument-dependent lookup (ADL).

The types `boost::asio::ip::tcp::socket`, `boost::asio::ssl::stream<`boost::asio::ip::tcp::socket`>` and `boost::beast::websocket::stream<NextLayer>` meet these requirements.