Repository navigation
[2/3] implement the caller-side managed buffers API (take 2) - #1583
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1583 +/- ##
==========================================
- Coverage 95.90% 95.60% -0.30%
==========================================
Files 78 79 +1
Lines 16211 16662 +451
==========================================
+ Hits 15547 15930 +383
- Misses 664 732 +68 ☔ View full report in Codecov by Sentry. |
b7dc99e to
664d0fb
Compare
ca6f70d to
b02bc61
Compare
|
I'll resume looking into implementing |
|
Like with the previous revision of this PR, I generated some docs for ease of review of the public API. Hope this is helpful! enum EarlyDataError |
djc
left a comment
There was a problem hiding this comment.
Just looked at the first commit for now.
| } | ||
|
|
||
| #[derive(Default)] | ||
| struct MessageDeframerBuffer { |
There was a problem hiding this comment.
This feels a little verbose. Just DeframerBuffer should do?
ctz
left a comment
There was a problem hiding this comment.
Up to and including "early data support".
|
docs and module org wise, what do you think about exporting / exposing all the |
|
I'll suggest we trim this PR down to only the deframer buffer commits in order to make it more digestible? |
separated the deframer commits into #1595 |
d3ddb1a to
3e8103f
Compare
|
rebased to fix a merge conflict. I also have fleshed out more the API docs |
3e8103f to
bbc0830
Compare
bbc0830 to
620e11e
Compare
|
rebased to fix merge conflicts |
f526a4a to
334d6f4
Compare
af5e3e6 to
4996f62
Compare
|
@cpu not sure why I can't comment but #1583 (comment) these functions have been renamed already. |
Sorry, GitHub has really mangled the interleaving of my review comments with the older ones 😭 |
4996f62 to
5a55d44
Compare
5a55d44 to
cfbcb5c
Compare
This allows people to use `unwrap_err`, etc.
This a) returns an error, and b) sends an alert. But unfortunately (a) doesn't include accounting for the processed bytes.
This sticks the error from `process_tls_records()` inside `UnbufferedStatus`. That means the `discard` field is still available, but continues to require handling the error to learn the `state` field's underlying value. TODO: the example code is made to unwrap errors in this PR. They need reorganising so the discard processing happens before error handling.
|
epic! |
supersedes #1578
but I'm not closing that one just yet because this one is still WIPI took a different approach and tried to first move the buffers out from
CommonStateintoConnectionCommonto implementConnectionCommonon top ofUnbufferedConnectionCommon; that turned out to be a non-trivial exercise. Then I tried the same "unbuffering" exercise withMessageDeframerand that turned out to be relatively straightforward. That's when I realized that as a more incremental step we can implementUnbufferedConnectionCommonon top of the current, bufferedCommonStatewhile still achieving the goal of not depending on IO traits or anything else from thestdcrate. So that's what this PR does (I haven't finished moving the server and early data stuff over from #1578 )I did some renaming while copying over bits from #1578