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

does proxygen have websockets support? #206

Closed
mariasmo opened this issue Dec 5, 2017 · 7 comments
Closed

does proxygen have websockets support? #206

mariasmo opened this issue Dec 5, 2017 · 7 comments

Comments

@mariasmo
Copy link

mariasmo commented Dec 5, 2017

hi ,

does proxygen have websockets support yet?

thanks

@afrind
Copy link
Contributor

afrind commented Dec 5, 2017

Can you elaborate by what websocket support you would like from proxygen? Proxygen can handle the HTTP interactions required for a websocket handshake (Upgrade headers, send 101 Switching Protocls), but does not provide any native parsing or generating of websocket frames.

@jmccl
Copy link
Contributor

jmccl commented Feb 6, 2018

I suspect @mariasmo is essentially requesting that the websocket proxygen module referred to by @lanxi in #170 be open sourced.

@ritunp
Copy link
Contributor

ritunp commented Jul 23, 2018

We recently added support for WebSockets. Proxygen handles the handshake part if the application asks for a WebSocket upgrade. To ask for a WebSocket upgrade on a transaction, the HTTPMessage has a call "setEgressWebsocketUpgrade". Responses will similarly be marked with a flag if they contain appropriate WebSocket response headers - this can be checked with a call to "isIngressWebsocketUpgrade" on the HTTPMessage.

Note: for now, you would need to add the "Sec-WebSocket-Version" header to the HTTPMessage. This requirement should go away soon.

@frenchietechie
Copy link

Hello does anybody have an example of making a working websocket request?

I have been at this for a couple of days and I can't get it to work

@frenchietechie
Copy link

PS: trying various variations of something like this: https://gist.github.com/frenchietechie/47ba9ffa069f359ad99e1dcbf7f7f892

but I keep getting error codes such as

Bad Request

Your browser sent a request that this server could not understand.

@kvtsoy
Copy link
Contributor

kvtsoy commented Mar 24, 2022

Are you connecting to a proxygen server?

@jbeshay
Copy link
Contributor

jbeshay commented Jul 14, 2023

An example has been committed in bc44e34.

@jbeshay jbeshay closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants