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"?