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

CN106713437AInactive Publication Date: 2017-05-24北信源系统集成有限公司
5 Cites 5 Cited by

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
    Figure 1
Patent Text Reader

Abstract

The invention provides a method used by a server to send a message to a client in an NAT network. The method comprises the steps that a UDP-S service is turned on in the server to communicate with the client; the client sends a UDP data packet to the UDP-S service of the server to establish a server cache information table; the server judges whether the client is located within the internal network defined by an NAT gateway according to the UDP data packet and returns the client identity; the client responds to the client identity to establish a UDP communication channel between the server and the client; and the server calls the UDP-S service according to the server cache information table to send the message to the client through the UDP communication channel. According to the invention, the bandwidth of the server side is saved, and the communication channel is easily established.
Need to check novelty before this filing date? Find Prior Art

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...