CLI tool for websocket testing
go get github.com/gobwas/gws
Connect to the websocket server:
gws -u "ws://my.cool.address"
Run simple server and type response messages in terminal:
gws -l ":8888" -resp=prompt
Or just simple echo:
gws -l ":8888" -resp=echo
Usage info:
Usage of gws:
-H string
list of headers to be passed during handshake
format:
{ pair[ ";" pair...] },
pair:
{ key ":" value }
-l string
run ws server and listen this address
-resp value
how should server response on message (echo, mirror, prompt) (default mirror)
-u string
websocket server url
-v show additional debugging info
-x int
try to reconnect x times (default 1)
gws
is highly inspired by wsd and iocat. But in both
tools I found not existing features that I was needed some how.