cpan-testers / cpantesters-api

An API in to data held by CPAN Testers: Test reports and CPAN uploads
Other
4 stars 4 forks source link

Add ping to WebSocket example feed.pl #8

Open preaction opened 7 years ago

preaction commented 7 years ago

@jberger says if we add a regular ping, we can be better-notified when connections go down for strange reasons. Mojolicious will automatically respond to pings in Mojo::UserAgent, so we just need to send them. This should make the WebSocket APIs more reliable.

jberger commented 7 years ago

Sending a ping frame is the frame example shown for the Controller's send method. Note for clarity that a frame is sent by passing an arrayref to send.