Method used by server to send message to client in NAT network
A technology for sending messages and clients, applied in transmission systems, electrical components, etc., can solve the problems of complex implementation, difficulty in grasping, waste of server-side bandwidth, etc., and achieve low latency, simple establishment, and good latency
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2017-05-24
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure 1
Abstract
Description
technical field
[0001] The present invention relates to the field of computer network communication, and more particularly to a method for sending a message from a server to a client in a NAT network. Background technique
[0002] The communication between the client and the server is based on HTTP (Hypertext Transfer Protocol), and HTTP is a stateless communication protocol. Each request-response is based on a newly established HTTP connection, which makes the server actively notify The client becomes a difficult point.
[0003] At present, there are two mainstream solutions: one is the client-side polling technology, that is, the client periodically actively accesses the server's public IP address to obtain changes in the server's data status. The problem with this method is: if The server's business data does not change during two consecutive polling requests, and the work of the latter request is actually negative—wasting server-side bandwidth, and no payload is obtaine...
Examples
Embodiment Construction
[0024] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0025] like figure 1 As shown, a schematic flowchart of a method for sending a message from a server to a client in a NAT network according to the present invention is shown. In order to be able to communicate with the client, the server must first activate the UDP-S and TCP-S services. It should be understood that any other service between the server and the client can also directly access the UDP-S service. Then, the client sends a UDP data packet to the server through the UDP-S service, and the UDP data packet contains the unique ID number of the client, the intranet IP address and the intranet UDP li...