has not been actually developed yet, is the process like this
- the server socket, connected to the PC through Ip and port will get a client_id
- the PC side takes the client_id to request the server, and the server binds the obtained client_id with the user"s uid to generate channel, which is recorded in the database and returned to the PC side. The PC side has been listening to the channel. when the user is online .
- when the server wants to send an active push message, it finds out that the channel, of the user uses the GatewayClient call API to push the message from the database. When the user exits, it clears the channel from the database .
if the process is right,
- if there are a large number of users when connecting and exiting, frequent reading and writing to the database will certainly cause a burden on the database.
- when many users are online, they are listening to whether the socket, server can"t afford it
if the process is wrong, please give me some advice. Thank you so much!