-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unifying pipe IO #55
Comments
I am starting to think that we might just remove the duplication of |
Would your proposal use the async functionality or just the stream if it had to choose between those two? |
I deliberately avoided async stuff for R0 as I wanted to get review of the basic design first and also I never used async stuff of the Networking TS/ASIO myself. I find I've also read that C++23 executors are different enough from Networking TS that it requires a redesign. So, I'd rather keep sync and async stuff in different classes but will compromise and put them in the same class if required by LEWG[I]. |
I'm working on byte IO proposal and hope to get R0 in Prague. I've actually thought about adding pipes before I found this proposal. I hope to share some experience and make us sync the API.
Right now there 2 functions for IO in the process proposal:
while my API uses this:
As you can see, the API is pretty similar but there are important differences. I return
streamsize
because it is defined to hold the size of IO operation. This type is also signed which is important in template code where unsigned types ruin arithmetic.2nd - naming. The names were taken from Networking TS because they point out that that buffer may not be transferred fully. For that reason I provide high level
std::io::read
andstd::io::write
customization points that callread_some
andwrite_some
in a loop until the buffer is transferred.Also note on vectored IO which is not in my proposal yet. From my understanding of MSDN, Windows requires perfectly aligned and sized pages so
span<span<byte>>
doesn't work in most cases. Also POSIX usesiovec
and I've found I'd need to inherit my custom span class fromiovec
to pass it to POSIX functions without any memory allocations. What I'm saying is I think Networking TS design for vectored IO needs to be tweaked before it works in intuitive way.The text was updated successfully, but these errors were encountered: