Live data from Hacker News

Show HN: Wsta – a CLI for working with WebSockets written in Rust

github.com

1–10 of 15 posts

Re: Show HN: Wsta – a CLI for working with WebSockets written in Rust

#4
post #3
post #2

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.)

Something like: arecord -fdat | wsta ws:// ?

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 in Rust

#5
post #4
post #3

Earlier quoted context omitted.

Something like: arecord -fdat | wsta ws:// ?

Supposing this is correct, you can add the json with cat: arecord -fdat | cat init.json - | wsta ws://

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 in Rust

#6
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 in Rust

#7
post #5
post #4

Earlier quoted context omitted.

Supposing this is correct, you can add the json with cat: arecord -fdat | cat init.json - | wsta ws://

Yep, that sounds like the magic I was looking for. I'll try it out later today.

Holler if it works, that sounds pretty awesome!

Re: Show HN: Wsta – a CLI for working with WebSockets written in Rust

#8
post #6

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

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 in Rust

#9
post #8
post #6

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

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 :)

Glad to hear the back story of wsta! :)
Post reply on HN