wscat icon indicating copy to clipboard operation
wscat copied to clipboard

Keep open after --execute -x option?

Open kevzettler opened this issue 6 years ago • 2 comments

Seems like the connection closes immediately after invoking with the -x option?

passing -w seems allows for arbitrarily specifying a wait time. Is there a way to keep open after -x ?

kevzettler avatar Aug 31 '18 23:08 kevzettler

Hey, any update on this issue? I would really appreciate it if the connection wouldn't close whenever you use the -x option

Xdomen avatar Nov 26 '20 14:11 Xdomen

I'd also like this feature 😄

It looks like someone opened a PR related to this but it also does other things: https://github.com/websockets/wscat/pull/114

The main concern seems to be in this area of the code where the wait and close logic is tightly coupled to executing a command—if you don't provide a wait flag, it closes after 2 seconds of sending a command. It should just be kept open instead if you don't provide a wait flag. You can't pass a large number either otherwise it overflows. This logic should be changed.

https://github.com/websockets/wscat/blob/5.2.0/bin/wscat#L276-L283

techygrrrl avatar May 20 '23 17:05 techygrrrl