Skip to content
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

feat!: Add a new error type for handshake timeouts #37

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

tmccombs
Copy link
Owner

And make the errors enun non_exhaustive

BREAKING CHANGE: Adds a new variant to the Error Enum
BREAKING CHANGE: The Error enum is now non_exhaustive
BREAKING CHANGE: Now returns an error if a handshake times out
Fixes: #36

And make the errors enun non_exhaustive

BREAKING CHANGE: Adds a new variant to the Error Enum
BREAKING CHANGE: The Error enum is now non_exhaustive
BREAKING CHANGE: Now returns an error if a handshake times out
Fixes: #36
…it in errors.

BREAKING CHANGE: The enum variant `Error::ListenerError` is now struct-like instead of tuple-like, and is `non_exhaustive` like the enum itself.

BREAKING CHANGE: `Error` now has three type parameters, not two.

BREAKING CHANGE: `TlsListener::accept` and `<TlsListener as Stream>::next` yields a tuple of (connection, remote address), not just the connection.

BREAKING CHANGE: `AsyncAccept` now has an associated type `Address`, which `poll_accept` must now return along with the accepted connection.
This builds on the previous commit. In addition to some minor stylictic
and naming changes (such as calling the address peer_addr instead of
remote_addr to be more consistent with tokio and stdlib), the main
change here is replacing the FutureWithExtraData with a more
purpose-built Waiting struct encodes the state of a connection that is
waitinf for a handshake to complete.

BREAKING CHANGE: AsyncAccept::Error must implement std::error::Error
BREAKING CHANGE: TlsAcceptError is now a struct form variant.
Fixes: #36
@tmccombs tmccombs merged commit c6a68b4 into main Oct 17, 2023
15 checks passed
@tmccombs tmccombs deleted the timeout-errors branch October 17, 2023 06:47
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.

Report timeouts as Errors, with original connection (AsyncAccept::Connection)
2 participants