WebSocket cat
npm install wscatWebSocket cat.
This module needs to be installed globally so use the -g flag when installing:
```
npm install -g wscat
`
Usage: wscat [options] (--listen
Options:
-V, --version output the version number
--auth
--ca
--cert
--host
--key
--max-redirects [num] maximum number of redirects allowed (default: 10)
--no-color run without color
--passphrase [passphrase] specify a Client SSL Certificate Key's passphrase (--connect
only). If you don't provide a value, it will be prompted for
--proxy <[protocol://]host[:port]> connect via a proxy. Proxy must support CONNECT method
--slash enable slash commands for control frames (/ping [data], /pong
[data], /close [code [, reason]]) (--connect only)
-c, --connect
-H, --header
(default: [])
-l, --listen
-L, --location follow redirects
-n, --no-check do not check for unauthorized certificates (--connect only)
-o, --origin
-p, --protocol
-P, --show-ping-pong print a notification when a ping or pong is received
(--connect only)
-s, --subprotocol
(default: [])
-w, --wait
-x, --execute
one (--connect only) (default: [])
-h, --help display help for command
`
```
$ wscat -c wss://websocket-echo.com
Connected (press CTRL+C to quit)
> hi there
< hi there
> are you a happy parrot?
< are you a happy parrot?