Open nebloc opened 5 years ago
Thank you for the PR. Some thoughts:
--quiet
is not a good name for the option. It's too general when in reality it only prevents ping messages from being printed.--silence-incoming-pings
) any suggestions? 😅 At the same time wouldn't hurt to have, but should not be under the same flag. I am testing a service that will ping often and I don't need to know, just pong back, but when I ping I want to ensure it pongs me.
My point is, if this happens with everything that is written (data messages, pings, pongs) why this only take into account pings? Not sure if it's possible or how hard it will be but isn't it better to try to solve the issue differently? Ideally what is written should not mess up user input.
Perhaps a slightly different view of the same problem. To me, ping/pongs are part of the underlying protocol. In the same way I don't see the HTTP upgrade request, I don't want to see the websocket control frames in normal operation. Based on that, perhaps another option for verbose control frames? By default, no control frames are printed but --verbose-control-frames
would enable it. This would then include all control frames, which currently there are only three defined (as far as I know). Close, Ping & Pong.
Does that make sense?
I was testing a service that pinged a lot, and would interrupt typing, so I added a flag
-q, --quiet
that would silence the ping control frame (pong and close control frames handled same as usual) from the console.May be useful for others 🤷♂️ 😄