Active push problem of socket io making long connection

recently, I made a chat app, that uses socket io to make a long connection. Normally, I listen to different events for different processing. Now, if I want to actively push messages to the chat room, what should I do? Are there any examples or ideas that the gods have ideas or related references? Thank you for answering!

May.08,2021

then do not break the long link, keep it, and then take the initiative to emit

.
Menu