How does websocket handle the number of unread messages

The

project should have a trigger mechanism similar to qq chat. When there is a message, the user does not read it and shows the number of unread messages. How to deal with this, especially when a user is chatting with another user and another user sends a message; how to tell if he has not read it?

Mar.11,2021

this isn't just about websocket, it's about your interface. If you didn't do the front end, you can define a read event for the front end to use properly.
if the front end is also done by you, depending on how you define "read", you can mark all unread messages sent by that person as read when you open the user's chat window, or mark the unread messages displayed as read when the chat window scrolls.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36978-2c00e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36978-2c00e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?