Push data to clients in room when file changes

Whenever a file changes, I’d like to push the data from this file to all clients in a specific room.

Watching the file for changes seems simple with falood/file_system, but how do I get a list of all open sockets and broadcast these changes?

Have you seen the Broadcasting to an external topic section in the phoenix channel documentation?

As I’m not sure whether or not you are trying to send from inside a channel or the outside, I’m not sure though if the upper exacmple using broadcast_from or the bottom using just broadcast is the proper one for you.

1 Like

Hadn’t seen, but seems to be exactly what I was looking for.

Thank you!