You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to write a simple server, I noticed that when writing to a corosio tcp_socket creating the const buffer for the write is rather ugly. Since these libraries are already so tied together methods/overloads for working with capy/corosio would be nice. For example this:
Unless I missed some very obvious method, there is no nice way to pass an http::request to write_some. Just .buffer() doesn't work as write_some doesn't accept a string_view.
Activity
vinniefalco commentedon Aug 12, 2026
Yes there is friction here that needs addressing. How does ASIO do it?
R-Goc commentedon Aug 12, 2026
Not too familiar with ASIO. Const_buffer in asio has a constructor that accepts a span. I assume string_view would satisfy this from looking at it but I didn't try. https://think-async.com/Asio/asio-1.38.2/doc/asio/reference/const_buffer/const_buffer/overload4.html