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 a way to manually upgrade a request to WebSocket #2498

Merged
merged 4 commits into from
Apr 7, 2021

Conversation

wacumov
Copy link
Contributor

@wacumov wacumov commented Sep 29, 2020

Adds a way to manually upgrade an incoming request to WebSocket (#2235).

app.get("socket") { req in
    // Check things from the request.
    return req.webSocket { req, ws in
        // Handle WebSocket lifecycle here
    }
}

@flowtoolz
Copy link

@tanner0101 I'd be super excited to see this happen, maybe you know someone who can review it ... 😁

Base automatically changed from master to main March 12, 2021 02:50
@0xTim
Copy link
Member

0xTim commented Apr 6, 2021

@wacumov thanks for this and sorry it's languished for so long! If you could fix the conflicts and add a test to show the manual upgrade we can get this merged!

@0xTim 0xTim added the semver-minor Contains new API label Apr 6, 2021
@wacumov
Copy link
Contributor Author

wacumov commented Apr 7, 2021

@0xTim I fixed the conflicts and added a test for the manual upgrade.

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Thanks!

@0xTim 0xTim merged commit ffbf6c8 into vapor:main Apr 7, 2021
@VaporBot
Copy link
Contributor

VaporBot commented Apr 7, 2021

These changes are now available in 4.42.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Contains new API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants