Skip to content

tls: add helper method to simplify poll implementations#48379

Merged
jkarneges merged 1 commit into
mainfrom
jkarneges/tls-poll-helper
Jul 2, 2026
Merged

tls: add helper method to simplify poll implementations#48379
jkarneges merged 1 commit into
mainfrom
jkarneges/tls-poll-helper

Conversation

@jkarneges

@jkarneges jkarneges commented Jul 1, 2026

Copy link
Copy Markdown
Member

AsyncTlsStream's various poll implementations for I/O traits and the handshake future contain a lot of boilerplate. This PR attempts to consolidate the common logic into a single method, with the differences supplied in closures. It's a bit ugly with 6 generics, but probably worth the DRY for this kind of fiddly logic. It will also make it possible to add a poll_write_vectored method in a few lines.

@jkarneges jkarneges requested a review from a team July 1, 2026 23:46
@jkarneges jkarneges merged commit 56eb49a into main Jul 2, 2026
19 checks passed
@jkarneges jkarneges deleted the jkarneges/tls-poll-helper branch July 2, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants