websockets / wscat

WebSocket cat
MIT License
2.25k stars 223 forks source link

wscat -x causes data stream to stop? #76

Closed AmyNgithub closed 6 years ago

AmyNgithub commented 6 years ago

If I run: wscat -c ws://<address-to-my-websocket> -x 385

This will start a stream of gps positions for the specified unit. However after ca 32 seconds or 32 positions the stream stops.

However if I send the command manually:

wscat -c ws://<address-to-my-websocket>
> 385

The stream does not stop.

I need to send the first command automatically. Is there a way to fix so that the flag -x does not cause the stream to stop? Or another alternative to achieve the same result?

lpinca commented 6 years ago

I think you need to use -w / --wait <seconds>, by default it closes the connection after 2 sec when using -x.

AmyNgithub commented 6 years ago

Ah! Thank you!