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

Add HTTP2FrameConvertible and HTTP2FramePayloadConvertible #216

Merged
merged 1 commit into from Jul 28, 2020

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Jul 28, 2020

Motivation:

As part of the work for #214 to enforce stream creation order we need to
remove the requirement that the data sent over the stream be aware of
its stream ID ahead of time. This requires that the channel transporting
the data provide the stream ID. As such we need a way to convert between
data with stream IDs and data without stream IDs.

Modifications:

  • Add 'HTTP2FrameConvertible' protocol whose conforming types can make
    an 'HTTP2Frame'.
  • Add 'HTTP2FramePayloadConvertible' protocol whose conforming types can make
    an 'HTTP2Frame.FramePayload'.
  • Conform 'HTTP2Frame' and 'HTTP2Frame.FramePayload' to the above
    protocols.

Result:

We have a protocol which an HTTP2 stream channel may be generic over.

Motivation:

As part of the work for apple#214 to enforce stream creation order we need to
remove the requirement that the data sent over the stream be aware of
its stream ID ahead of time. This requires that the channel transporting
the data provide the stream ID. As such we need a way to convert between
data with stream IDs and data without stream IDs.

Modifications:

- Add 'HTTP2FrameConvertible' protocol whose conforming types can make
  an 'HTTP2Frame'.
- Add 'HTTP2FramePayloadConvertible' protocol whose conforming types can make
  an 'HTTP2Frame.FramePayload'.
- Conform 'HTTP2Frame' and 'HTTP2Frame.FramePayload' to the above
  protocols.

Result:

We have a protocol which an HTTP2 stream channel may be generic over.
@glbrntt glbrntt added the 🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0 label Jul 28, 2020
@glbrntt glbrntt requested a review from Lukasa July 28, 2020 13:06
@glbrntt glbrntt added patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) and removed 🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0 labels Jul 28, 2020
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shiny, looks great.

@Lukasa Lukasa merged commit 7b0faab into apple:master Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants