on your rails app 8+ include this turbo_stream_from
it will open a websocket subscription with action cable
<%= turbo_stream_from :todos %>
Sending custom messages manually with action cable
ActionCable.server.broadcast "todos", "Hello"
Or with turbo frames
ActionCable.server.broadcast "todos", "<turbo-frame action='append' target='todos'><template>Hello</template></turbo-frame>"