Home > other >  How to distinguish between long connection and stateless HTTP protocol?
How to distinguish between long connection and stateless HTTP protocol?

Time:10-20

Watched a few articles on the Internet, all say HTTP protocol TCP/IP communication can realize long browser and server connection, namely after the two sides establish a connection without wave four times, connection status remained before the timeout,
However, the HTTP protocol is not a stateless (after the server sends the echo immediately disconnect)?

CodePudding user response:

You see, there is no one mentioned in article specific reason?

CodePudding user response:

reference 1st floor Runnerchin response:
you see article mentioned, there is no a specific reason?

Long search HTTP connections, HTTP stateless has a lot of articles,
Mean, roughly HTTP1.1 version in the browser and server connection is established, and finally not to four wave (disconnected) action, can be long connection duplex communication,
HTTP is a stateless said, however, the server for each browser has no memory function request, where each echo data to complete the connection immediately disconnect,
It makes me very disappointed ah ~ ~ ~

CodePudding user response:

Personal understanding, connection created when a TCP connection, and then open channel with TCP, HTTP is bubble in the channel, the so-called open connection is in the keep alive -=true, disconnect the channel after the HTTP request, is the socket is continuously open, namely each request channelSession is a new sessio, and in the socket connection timeout before the socket object is the same, so need not repeat create a socket object, not for the socket of the connect operation, accelerated the speed of response, and at the time of keep - the alive=false after each request all the socket to disconnect, the next request again launched a socket connection, the response speed is slow,
Employing the, please correct me downstairs left left left
  • Related