Add server-api to support http 1.1 upgrades #50
Merged
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.
Explore adding support for HTTP 1.1 upgrades. This involves updating the API for the core response/server types just-enough to allow using libraries like
async_websocket
so shuttle based http servers can also serve web socket requests.This is a WIP api, and should probably be called
expert
instead ofupgrade
. The intention for this new function is to write an initial response, and instead of writing a body surface the underlying file-descriptor to a user provided handler. The intended use-case is for http-upgrades where the user's service can either reject a request, or specify an initial response (headers) and then start using another protocol with the connected peer. This helps upgrade an existing http/1.1 connection to another protocol without having the client perform another TCP handshake.