Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Heartbeat packet asynchronous control method and apparatus

A technology of asynchronous control and heartbeat packets, applied in digital transmission systems, electrical components, transmission systems, etc., can solve the problems of complex programming, uncontrollable SO_KEEPALIVE, and long judgment of network disconnection, so as to achieve full utilization and overcome multi-threaded programming and protocol complex effects

Active Publication Date: 2016-12-21
SHENZHEN INST OF ADVANCED TECH
View PDF7 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This mechanism is simple and reliable, but has the following disadvantages: SO_KEEPALIVE cannot be controlled, it will be sent every moment; SO_KEEPALIVE is set to idle for 2 hours before sending a "keep alive detection segment", which cannot guarantee real-time detection, so it is very important for judging network disconnection The time is too long, and it is not suitable for programs that require timely response
However, the disadvantage of the above method is: for the operating system, if the number of online clients is huge, the development of processes and threads will require frequent development and Destroying threads is also a big overhead for the system, and the programming is more complicated, it is difficult to ensure the synchronization of multi-thread communication, and it is easy to cause thread deadlock

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Heartbeat packet asynchronous control method and apparatus
  • Heartbeat packet asynchronous control method and apparatus
  • Heartbeat packet asynchronous control method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention.

[0036] See figure 1 , Is a flowchart of a method for asynchronous control of a heartbeat packet in an embodiment of the present invention. The heartbeat packet asynchronous control method in the embodiment of the present invention includes:

[0037] Step 10: The server Socket communication parameters are initialized, and the listening socket descriptor socket_fd is established;

[0038] In step 10, Socket is usually called "socket", which is used to describe the IP address and port. It is the handle of a communication chain and can be used to implement communication between different virtual machi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of heartbeat packet control and especially relates to a heartbeat packet asynchronous control method and apparatus. The heartbeat packet asynchronous control method comprises the following steps: step A, performing server socket communication parameter initialization and server communication model initialization, and establishing a monitoring socket descriptor; step B, establishing and initializing a server dynamic list; step C, initializing and starting a system timer controlling a heartbeat packet; and step D, invoking a monitoring function, determining whether a client communication event is triggered, if so, a server main program exiting from the monitoring function, and the server traversing and processing the communication event, and if not, continuously waiting until the client communication event is triggered. According to the invention, by use of an Epoll server model of a linux system, the method and apparatus are simple, reliable and highly efficient, the problems of multithread programming and protocol complexity are overcome, system memory resources are fully utilized, heartbeat packet data is efficiently processed.

Description

Technical field [0001] The invention relates to the technical field of heartbeat packet control, in particular to a method and device for asynchronous control of heartbeat packets. Background technique [0002] A heartbeat packet is usually a data packet sent by the client to the server every short period of time to inform the server that it is still online and transmit some necessary data. The server will reply with a fixed message after receiving it. If the server is in the specified time If no client information is received, the client is considered disconnected. Because it is sent at a certain time interval, it is similar to a heartbeat, so it is called a heartbeat packet. The content of the heartbeat packet is not specifically defined, it is usually a small packet or just an empty packet containing the header. [0003] Heartbeat packets are very important in the communication between wearable devices and remote servers, because most wearable devices currently use GRPS networ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/26H04L29/08H04L29/06
CPCH04L43/10H04L67/145H04L69/162H04L67/54
Inventor 宁运琨赵国如李慧奇
Owner SHENZHEN INST OF ADVANCED TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products