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

WebSocket Subprotocol #5

Merged
merged 7 commits into from
Dec 7, 2017
Merged

WebSocket Subprotocol #5

merged 7 commits into from
Dec 7, 2017

Conversation

ArtiomL
Copy link

@ArtiomL ArtiomL commented Dec 7, 2017

Hi,

Some WebSocket servers require specifying the subprotocol value used in the Sec-WebSocket-Protocol header during the handshake.

I have added a new argument (-s, --subprotocol) that updates the connection protocol option.

Thank you in advance!

@jnordberg
Copy link
Owner

Thanks! Can you run make lint and commit? Should fix the tests

@ArtiomL
Copy link
Author

ArtiomL commented Dec 7, 2017

OK got it.
I think everything is fixed now - could you please verify?
Thank you!

@jnordberg
Copy link
Owner

LGTM, have you verified that the option you added works as intended?

@ArtiomL
Copy link
Author

ArtiomL commented Dec 7, 2017

Yes.

./ts-node ../../src/cli.ts ws://demos.kaazing.com/echo
NoSubProtocol
NoSubProtocol
^C
./ts-node ../../src/cli.ts ws://192.168.118.133:32773 -s echo
WithSubProtocol
WithSubProtocol
^C

@jnordberg jnordberg merged commit 8446bc9 into jnordberg:master Dec 7, 2017
@jnordberg
Copy link
Owner

Cheers!

@ArtiomL
Copy link
Author

ArtiomL commented Dec 7, 2017

For some reason Travis fails with Node v7:
https://travis-ci.org/jnordberg/wscat/jobs/313232015

It runs OK with Node v7 locally.

Error: listen EADDRINUSE :::41328 on their side?

@ArtiomL
Copy link
Author

ArtiomL commented Dec 7, 2017

Works now.
This tool is amazing!

Are you planning to publish to npm as well?
https://www.npmjs.com/package/wscat2

Thank you.

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 this pull request may close these issues.

2 participants