jaspervdj / websockets

A Haskell library for creating WebSocket-capable servers
http://jaspervdj.be/websockets
BSD 3-Clause "New" or "Revised" License
405 stars 112 forks source link

Added a way to manually send a Pong message. #217

Closed RationalAsh closed 7 months ago

RationalAsh commented 3 years ago

Hi! I've been playing around with various cryptocurrency exchange APIs using this library (+wuss) and I'm loving it so far. However, I've come across an unusual situation. There are certain servers that seem to expect unsolicited Pongs (?!) to keep the connection alive. So I've added a way to manually send the Pong messages. It's a fairly small addition - basically identical to the sendPing function. Hope you can merge. Let me know if I need to add anything else.

Thanks!