Awesome
iocat
Socket.IO and WebSocket netcat-like utility.
Usage
$ iocat --help
Usage: iocat [options] URL
Options:
-h, --help output usage information
-V, --version output the version number
-v, --verbose verbose
-l, --listen Start in listen mode, creating a server
-p, --local-port <port> Specify local port for remote connections
--socketio Use socket.io
-k, --keep-listen Keep inbound sockets open for multiple connects
-e, --emit-key <key> Emit-key, default is "message"
Examples
WebSocket Server
$ iocat -l -p 3050
> Hello !
< Hi !
WebSocket Client
$ iocat ws://127.0.0.1:3050
< Hello !
> Hi !
Socket.IO Server
$ iocat --socketio -l -p 3050
> Hello !
< Hi !
Socket.IO Client
$ iocat --socketio ws://127.0.0.1:3050
< Hello !
> Hi !
Install
npm install iocat -g
Alternatives
The WebSocket part is an alternative to the built-in wscat
binary, packaged with ws.
License
MIT