How to send websoecket message from the backend in rust?

That’s what for us seems to be a bug. Reinstalling the canister may solve the issue, as I mentioned here:

Have you tried it?

On the frontend client, are you getting any errors? Are you getting this sequence of log messages in the console?

[init] Generating new secret key
[onWsOpen] WebSocket opened, sending first service message
[onWsOpen] First service message sent
[onWsMessage] First service message received