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

Allow Sub-Protocol negotiation during the Websocket handshake. #38

Closed
eisensheng opened this issue Nov 23, 2014 · 3 comments · Fixed by #44
Closed

Allow Sub-Protocol negotiation during the Websocket handshake. #38

eisensheng opened this issue Nov 23, 2014 · 3 comments · Fixed by #44

Comments

@eisensheng
Copy link

The RFC6455 Section 1.9 leaves us with a header field to negotiate a sub-protocol during the Websocket handshake. It would be nice if you could allow your library users to interfere at this time so we can see which protocols are advertised by the client, choose one of them or enforce a completely different value and send it back to the client. Of course the ws_handler needs to know which protocol has been chosen.

@aaugustin
Copy link
Member

Since I didn't need this myself, I was waiting to see if there was demand for this feature. I'll look into it.

aaugustin added a commit that referenced this issue Jan 31, 2015
@aaugustin
Copy link
Member

Can you have a look at this pull request and tell me if it works for you? Thanks!

@eisensheng
Copy link
Author

Haven't tested it but the change set looks amazing! I especially like the way one can override select_subprotocol to interfere at this point while the default implementation already looks perfect. Thank you very much for this one. 👍

aaugustin added a commit that referenced this issue Jan 31, 2015
aaugustin added a commit that referenced this issue Jan 31, 2015
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

Successfully merging a pull request may close this issue.

2 participants