What are "long connections" and "short connections"?

Source: Internet
Author: User

Reprint Address: http://blog.csdn.net/lee576/article/details/3245167

Explanation 1

The so-called long connection refers to the establishment of a socket connection, regardless of whether or not to remain connected, but less security,
The so-called short connection refers to the establishment of a socket connection after the data received after the end of the connection, the general bank used short connection

Explanation 2

A long connection is a connection that is maintained in TCP-based communication, regardless of whether the data is currently being sent or received.
A short connection is a connection that is only made when there is data transfer, and the client-server communication/Transfer data is closed when the connection is completed.

Explanation 3

The concept of long connections and short connections seems to be only mentioned in the moving CMPP protocol, where other places have not been seen.
Communication mode
There are two types of connections between the various network elements: long connections and short connections. The so-called long connection, refers to a TCP connection can be continuously sent multiple packets, during the TCP connection remains, if no packet is sent, both sides need to send a detection packet to maintain this connection. Short connection refers to the communication between the two sides of the data interaction, a TCP connection is established, after the data is sent, the TCP connection is disconnected, that is, each TCP connection completes only a pair of CMPP messages sent.
At present, it is necessary to use long-connected communication mode between ISMG, and it is recommended to use long connection between SP and ISMG.

Explanation 4

Short connection: For example, HTTP, just connect, request, close, the process time is short, the server will not receive a request for a period of time to close the connection.
Long connections: Some services need to be connected to the server for a long time, such as CMPP, which usually needs to be maintained online.

What are "long connections" and "short connections"?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.