# wscat WebSocket cat. ## Installation This module needs to be installed globally so use the `-g` flag when installing: ``` npm install -g wscat ``` ## Usage ``` Usage: wscat [options] (--listen | --connect ) Options: -V, --version output the version number -l, --listen listen on port -c, --connect connect to a WebSocket server -p, --protocol optional protocol version -o, --origin optional origin -x, --execute execute command after connecting -w, --wait wait given seconds after executing command -P, --show-ping-pong print a notification when a ping or pong is received --host optional host -s, --subprotocol optional subprotocol (default: []) -n, --no-check do not check for unauthorized certificates -H, --header set an HTTP header. Repeat to set multiple (--connect only) (default: []) --auth add basic HTTP authentication header (--connect only) --ca specify a Certificate Authority (--connect only) --cert specify a Client SSL Certificate (--connect only) --key specify a Client SSL Certificate's key (--connect only) --passphrase [passphrase] specify a Client SSL Certificate Key's passphrase (--connect only). If you don't provide a value, it will be prompted for --no-color run without color --slash enable slash commands for control frames (/ping, /pong, /close [code [, reason]]) --proxy <[protocol://]host[:port]> connect via a proxy. Proxy must support CONNECT method -h, --help output usage information ``` ## Example ``` $ wscat -c ws://echo.websocket.org Connected (press CTRL+C to quit) > hi there < hi there > are you a happy parrot? < are you a happy parrot? ``` ## License MIT