websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

Pings regularly, not in blocking receive wait?

Open programmin1 opened this issue 5 years ago • 1 comments

This is a very handy library... but what if I want to listen, as in the example

while ($message = yield $connection->receive()) { ...

but also ping every x seconds even if there was nothing received? A websocket might need regular pings to stay active.

programmin1 avatar Feb 19 '21 03:02 programmin1

Pings are automatically sent, or so you want to send a message instead of a websocket ping?

kelunik avatar Feb 19 '21 07:02 kelunik