-
Notifications
You must be signed in to change notification settings - Fork 117
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
support 62-bit error codes #602
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…g application errors, when all their error codes are small (e.g., raw H3, QPACK), retaining conflicts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #601, at the moment quicly uses
int
for passing errors. This made sense when the early draft versions of QUIC used 16-bit error code space, but not any more. The standardized QUIC uses two 62-bit error spaces, one for the transport and another for the application. And now, we are starting to see the full 62-bit space actually being used; WebTransport draft-11 uses 0x52e4a40fa8db to 0x52e5ac983162.This pull request switches to use
int64_t
called asquicly_error_t
. The value space is divided in the following way:This change affects applications, in sense that the type used to communicate error codes between quicly and applications are changed.
However, the lower range of application error codes are unchanged. Therefore, applications that only use tiny error codes can continue using
int
to store them.Applications should continue using macros (e.g,
QUICLY_ERROR_IS_QUIC_APPLICATION(e)
,QUICLY_ERROR_GET_ERROR_CODE(e)
,QUICLY_ERROR_FROM_APPLICATION_ERROR_CODE(e)
) to convert between the coalesced error code space (i.e., formerlyint
, nowquicly_error_t
).Closes #601.