Long connection multi-timeout judgment method and device and computer readable storage medium
A judging device and long-term connection technology, applied in digital transmission systems, electrical components, transmission systems, etc., can solve the problem of TCP occupying server ports and other related resource information, and achieve the effect of saving resources and increasing access volume
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0095] Such as Figure 5 As shown, the embodiment of the present invention provides a kind of long connection multiple timeout judging method, and described method comprises the following steps:
[0096] S101. Establish a TCP long connection with the client, and push a message to the client,
[0097] The server of the application APP and the client installed on the mobile terminal establish a long connection through the TCP protocol to keep the data communication uninterrupted; when the server needs to push a message to the client, it can quickly push the message to the corresponding server.
[0098] S102. Perform timeout judgment on the TCP long connection according to connection time, heartbeat packet time and resource release time;
[0099] Due to the large number of clients, we know that the disconnection of TCP long-term connections needs to go through four processes, and the server will not actively disconnect TCP long-term connections under normal circumstances. If the...
Embodiment 2
[0139] Based on the same inventive idea, such as Figure 9 As shown, the embodiment of the present invention provides a hardware structure of a persistent connection multiple timeout judging device. Specifically, the persistent connection multiple timeout judging device 40 includes at least a processor 41 , a memory 42 and a data bus 43 . The data bus 43 is used to realize the connection and communication between the processor 41 and the memory 42. The memory 42, as a computer-readable storage medium, can store at least one computer program, and these computer programs can be read, compiled and executed by the processor 41. , so as to realize the corresponding processing flow. In this embodiment, the memory 42 is used as a computer-readable storage medium, in which is stored a long connection multiple timeout judging program, which can be executed by the processor 41, thereby realizing the steps of the following long connection multiple timeout judging method:
[0140] Establ...
Embodiment 3
[0156] Based on the same inventive concept, another aspect of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a long connection multiple timeout judging program, and the long connection multiple timeout judging program is determined by the processor During execution, implement the steps of the following long connection multiple timeout judging method:
[0157] Establish a TCP long connection with the client, push messages to the client,
[0158] Carry out overtime judgment to described TCP long connection by connection time, heartbeat packet time and resource release time;
[0159] When any one of the connection time, the heartbeat packet time and the resource release time reaches a preset threshold, it is determined that the TCP long connection times out and the connection information of the client is deleted.
[0160] Wherein, the processor is used to execute the long connection multiple timeout judgment program s...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com