What I did before was to use node.js + socket.io Put the connection information into a json. Use the key to identify which user it is. Then the message sent will hold this key and the server will forward it to the server through the key. The corresponding client. I only know the web and other things are not very clear
Compare with simple QQ. After the QQ user starts the client to log in, the user actually informs the server that he is online. Then the client handles the monitoring status of the server at this time. The so-called one-to-one message means that user A sends a message. The message goes out, and the message content must contain the content and receiver B. The server monitors the message, and then obtains clientSocket-B based on receiver B and forwards A's message to B. This is roughly the case
node.js + socket.io
websocket
What I did before was to use node.js + socket.io
Put the connection information into a json. Use the key to identify which user it is. Then the message sent will hold this key and the server will forward it to the server through the key. The corresponding client.
I only know the web and other things are not very clear
Compare with simple QQ. After the QQ user starts the client to log in, the user actually informs the server that he is online. Then the client handles the monitoring status of the server at this time. The so-called one-to-one message means that user A sends a message. The message goes out, and the message content must contain the content and receiver B. The server monitors the message, and then obtains clientSocket-B based on receiver B and forwards A's message to B. This is roughly the case