Skip to content

Should I implement the ping/pong recipe or not? #231

Answered by enisdenjo
MartijnHols asked this question in Q&A
Discussion options

You must be logged in to vote

Two decisions that influenced the subprotocol level ping/pongs the most are:

  • Not all backends supporting WebSocket level ping/pings
  • Bullet-proofing your connection

It is completely up to you and your use-case whether you want subprotocol ping/pongs. If you aim to transmit mission critical data through the WS connection, then yes, I recommend using the client to send subprotocol level ping/pongs too; or if your backend does not support WS ping/pongs, then yes, I recommend using the server sending subprotocol level ping/pongs to fill in the missing behavior. However, if neither are your use-cases, you're perfectly safe to use the lib out-of-the-box, which is no client pings and server sen…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@enisdenjo
Comment options

@MartijnHols
Comment options

@MartijnHols
Comment options

@andyrichardson
Comment options

@enisdenjo
Comment options

Answer selected by MartijnHols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants