adonisjs / transmit

A Server-Sent-Event module for AdonisJS
MIT License
65 stars 4 forks source link

Add ping to transmit to keep connection open #2

Closed adrianNEMO closed 6 months ago

adrianNEMO commented 6 months ago

Package version

-

Describe the bug

It would be nice for transmit to send a periodic ping message to prevent the connection to timeout when using services like Cloudflare which closes connections after 100 seconds when no data is sent. As a workaround I created a adonis provider which sends a event periodically to all clients. But this also requires to explicitly subscribe on the channel client. It would be nice if transmit would send by default a message to all clients which can be just ignored on the client side. Since it does not require a subscription

Reproduction repo

No response

RomainLanz commented 6 months ago

Released in 0.3.0 if you want to try and give some feedback! 👍🏻