安装 wscat 简单
npm install -g wscat
$ 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?
据说可用了,但是环境报错了
wscat -h
/usr/lib/node_modules/wscat/node_modules/ws/lib/websocket.js:354
...options
^^^