node package manager

iocat

WebSocket netcat with Socket.io support

iocat

Socket.IO and WebSocket netcat-like utility.

$ 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"

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 !
npm install iocat -g

The WebSocket part is an alternative to the built-in wscat binary, packaged with ws.

MIT