News for hackers. Stuff that matters.
Re:Show HN: Wsta – a CLI for working with WebSockets written... by devy on Monday May 23, 2016 @11:54AM (#11754651)
I have been using `wscat`[1] when I was developing a WebSocket app last year. It was a nifty little tool although it would require the entire nodejs / npm stack to be able to run it. `wsta` is probably more portable as all we need is just a native binary to run.

[1]: https://www.npmjs.com/package/wscat

Re:Show HN: Wsta – a CLI for working with WebSockets written... by esphen on Monday May 23, 2016 @12:03PM (#11754716)
Yep, wscat is pretty a pretty nice tool! I used it as well, but it always bothered me that I couldn't tell it what to send to the server when running it. It's super handy to be able to file bugs with a one-liner to reproduce the bug.

That lead me to fork it and send a PR with that feature. It never got merged, so I simply created a new project, which ultimately lead to this :)

Re:Show HN: Wsta – a CLI for working with WebSockets written... by devy on Monday May 23, 2016 @12:08PM (#11754753)
Glad to hear the back story of wsta! :)
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nfriedly on Monday May 23, 2016 @08:32AM (#11753405)
Can I use this to send an initial JSON message and then pipe audio data from my mic?

(I wouldn't be surprised if this is possible with standard UNIX magic... But I just don't know how.)

Re:Show HN: Wsta – a CLI for working with WebSockets written... by tty7 on Monday May 23, 2016 @08:41AM (#11753452)
Something like: arecord -fdat | wsta ws:// ?
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nindwen on Monday May 23, 2016 @09:35AM (#11753725)
Supposing this is correct, you can add the json with cat: arecord -fdat | cat init.json - | wsta ws://
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nfriedly on Monday May 23, 2016 @10:24AM (#11754014)
Yep, that sounds like the magic I was looking for. I'll try it out later today.
Re:Show HN: Wsta – a CLI for working with WebSockets written... by esphen on Monday May 23, 2016 @11:59AM (#11754683)
Holler if it works, that sounds pretty awesome!
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nfriedly on Thursday May 26, 2016 @02:15PM (#11780248)
I tried a few different things and couldn't make it work. I think the problem is that the audio data is getting sent as a text websocket message rather than binary message. I got a whole bunch of "error: stream did not contain valid UTF-8" and "No JSON object could be decoded" errors that I think both came from the remote end.
Re:Show HN: Wsta – a CLI for working with WebSockets written... by oliver006 on Monday May 23, 2016 @03:06PM (#11756048)
Shameless plug: I built something similar in Golang a while ago: https://github.com/oliver006/ws-client
Re:Show HN: Wsta – a CLI for working with WebSockets written... by dpc_pw on Monday May 23, 2016 @02:47PM (#11755913)
For users, I think it's better to ask to install rustup from rustup.sh, and then just `cargo install wscat`.
Re:Show HN: Wsta – a CLI for working with WebSockets written... by esphen on Monday May 23, 2016 @04:38PM (#11756756)
Quite true. Thanks for the tip!
Re:Show HN: Wsta – a CLI for working with WebSockets written... by qwertyuiop924 on Monday May 23, 2016 @12:31PM (#11754888)
But it needs a better name. I'm thinking telweb :-D.