From ed594e2acffb3d059793fbcdf44a34ee9d7244c7 Mon Sep 17 00:00:00 2001 From: Bruno Iljazovic Date: Mon, 27 Oct 2025 14:33:41 +0100 Subject: [PATCH] Correct StreamType concept in the docs. Summary: Resolves #40 {F3809560} Reviewers: ivica Reviewed By: ivica Subscribers: miljen Differential Revision: https://repo.mireo.local/D37895 --- doc/qbk/00_main.qbk | 1 + doc/qbk/reference/concepts/StreamType.qbk | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/doc/qbk/00_main.qbk b/doc/qbk/00_main.qbk index cfe9d73..0517956 100644 --- a/doc/qbk/00_main.qbk +++ b/doc/qbk/00_main.qbk @@ -33,6 +33,7 @@ [template refmem[class mem][reflink2 [class].[mem] [class]::[mem]]] [template refmemunq[class mem][reflink2 [class].[mem] [mem]]] [template asioreflink[id term][@boost:/doc/html/boost_asio/reference/[id].html [^boost::asio::[term]]]] +[template asioreflink2[id term][@boost:/doc/html/boost_asio/reference/[id].html [term]]] [template beastreflink[id term][@boost:/libs/beast/doc/html/beast/ref/[id].html [^boost::beast::[term]]]] [template beastconceptslink[id term][@boost:/libs/beast/doc/html/beast/concepts/[id].html [term]]] [template mqttlink[id text][@https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc[id] [text]]] diff --git a/doc/qbk/reference/concepts/StreamType.qbk b/doc/qbk/reference/concepts/StreamType.qbk index d90f4e7..95cc788 100644 --- a/doc/qbk/reference/concepts/StreamType.qbk +++ b/doc/qbk/reference/concepts/StreamType.qbk @@ -10,6 +10,15 @@ `StreamType` should meet the [beastconceptslink streams AsyncStream] concept. +[note + Because __WEBSOCKET_STREAM__ does not satisfy [asioreflink2 AsyncWriteStream [^AsyncWriteStream]], + requirements were relaxed to allow a stream to provide [*`async_write`] operation instead of [*`async_write_some`]. + + With [asioreflink2 ConstBufferSequence [^ConstBufferSequence]] cb and __CompletionToken__ t, + [*`s.async_write(cb, t)`] should meet the requirements of an [asioreflink2 asynchronous_operations 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 __TCP_SOCKET__.