Richard Hodges
Richard Hodges
basically a loop expressed as a coroutine.
Here's a very simplified example: https://godbolt.org/z/5a498e ``` #include #include #include #include #include #include #include using frame_vector = std::vector; using websock = boost::beast::websocket::stream; template auto async_write_frames( boost::beast::websocket::stream& ws, frame_vector const& frames,...
*nb `frames` is a buffer containing the data to send. It must outlive the composed op, which is why I capture it via shared_ptr in the completion handler.
Good point over the single writev. It wouldn't help you with WSS in any case. OpenSSL doesn't support scatter/gather. In addition, websocket protocol is a framing protocol, with the length...
I'm not sure this helps with websocket. Remember that intermediate routers are allowed to re-frame the data en-route. There's nothing high performance about the websocket protocol at all. If your...
Just to be sure I know what everyone is asking for here: Are we looking for a function which will write a batch of websocket messages? Or are we actually...
I see. The intention is to save on syscalls at the expense of an allocation. Shouldn’t be a major issue. I expect there’s a lot of code from the synchronous...
We didn't go any further with it at the time. However if it's compelling I'm happy to work on it. Do you have any idea of: 1 - how many...
Ok, so quite a few multi-message sends. Well ok, let’s try it. I’ll implement it on a branch and we can see if it helps.
`struct iovec` is very similar to `asio::const_buffer` and `asio::mutable_buffer`. The `readv` library call takes a pointer to an array of `struct iovec`, which in asio is a model of a...