Current location - Music Encyclopedia - Dating - How to realize the one-to-one chat function of small programs? How to chat with small programs?
How to realize the one-to-one chat function of small programs? How to chat with small programs?
Brief introduction of multi-port communication. At present, I use websocket.

On the server side, I use C# to make winform. Speckle technology is very mature. When the server is open, the client connects to the server and requests the service. Websocket supports multi-terminal communication. You can connect webSocket service with android, Web or other platforms. Send a message to the server, which will distribute the message.

1 and 1 chatting is that you think too much. No one really does it now. Three-way handshake dial protocol through a socket is not harmonious, because users can't be switched at will, and they have to respond every time. So we take the initiative to connect to the server, so as to achieve the goal of 1 right 1, 1 many to many, many to one. We can chat or turn information into instructions. What are the instructions for remote operation, sharing, uploading and downloading. When the server receives a message from a client, it can also specify the target client to send an offline message.