Closed
Conversation
Collaborator
|
@esphen, Do you mind resolving the conflicts and then I'll merge? |
Collaborator
|
Actually, as I think about it, it makes sense to grab the message from stdin. Does that seem reasonable to you, @esphen ? |
Collaborator
|
Looking at this, it looks like wscat2 already included this PR, which will then be represented in #30. I think we can close this and just wait for that to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Where I work we stream loads of market data, and the client is the boss of what it would like to stream. It can decide to stream the Oslo stock exchange in real time, for example. This we do via a
subscribestring.When working with services that use websockets, we usually don't get it right the first time. This means that we have to work on our servlet, then use
wscatto check the data is correct, make changes and restart. It would be great to be able to just use arrow up to do the same subscribe, and not have to have the subscribe string in notepad on the side, using copy and paste to get the data out from the server.It is also useful to be able to send a single wscat command to another developer, and not two commands they have to do in sequence. Minor, but a quality of life bump that is much appreciated.
This change would also make scripting easier, as you could simply pipe the command into
grep,awk, etc, without having to do clever bash workarounds to send that inital message.What
This PR adds a new argument,
-m, --message. This tells wscat to send the provided message to the server as soon as it is ready.Result