swift-nio-examples | examples of how to use swift-nio | Web Framework library
kandi X-RAY | swift-nio-examples Summary
kandi X-RAY | swift-nio-examples Summary
examples of how to use swift-nio
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of swift-nio-examples
swift-nio-examples Key Features
swift-nio-examples Examples and Code Snippets
Community Discussions
Trending Discussions on swift-nio-examples
QUESTION
What's the purpose the HTTP2ToHTTP1ServerCodec
. Why is it required to convert the HTTP/2 to HTTP/1 protocol?
ANSWER
Answered 2019-Aug-21 at 07:08HTTP/2 is HTTP(/1) semantics over multiple streams in a single TCP connection (and a new wire protocol). As an option, SwiftNIO therefore can allow you to use the HTTP(/1) data types to handle HTTP/2. That allows you to fully re-use your server/client implementations that you wrote using SwiftNIO and HTTP/1 for HTTP/2 too which for most people is a benefit.
That translation however is absolutely not required. If you prefer to operate on HTTP2 frames directly, you don't need to add the HTTP2ToHTTP1ServerCodec
to your pipeline.
Later edit: I should also point out that the HTTP2toHTTP1ServerCodec
is actually quite a simple piece of code that literally just translates the inbound and outbound messages between HTTP/2 frames and HTTP/1 message parts. Code is here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install swift-nio-examples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page