websockets / wscat

WebSocket cat
MIT License
2.25k stars 223 forks source link

[feature] Handle data in ping/pong frames #139

Closed zinid closed 2 years ago

zinid commented 2 years ago

Add ability to send ping/pong frames with application data attached (as per RFC6455, section 5.5.2 and 5.5.3). Also, when such frames are received, application data (if any) is displayed in the console. Example:

$ bin/wscat -c ws://127.0.0.1:80 --slash -P
Connected (press CTRL+C to quit)
> /ping
< Received pong (data: "")
> /ping foo
< Received pong (data: "foo")
lpinca commented 2 years ago

Thank you.