IPP Mail Archive: Re: IPP> Connection Maintenance in IPP

Re: IPP> Connection Maintenance in IPP

Scott Lawrence (lawrence@agranat.com)
Thu, 03 Jul 1997 08:39:34 -0400

>>>>> "RT" == Randy Turner <rturner@sharplabs.com> writes:

RT> In its current incarnation, IPP relies on HTTP 1.1, which by default
RT> maintains persistent TCP connections between HTTP client and HTTP
RT> server.

RT> With persistent connections a client can make as many requests and
RT> receive as many responses as it wishes prior to the closing the
RT> connection. NOTE: the server or the client may elect to close a
RT> connection so both client and server should be prepared to handle
RT> an unexpected connection close operation.

To expand on that just a little...

Either side may indicate that a connection is closing so that the
close need not be unexpected. The client may send

Connection: close

in a request to indicate that the server should close the connection
after sending the response, or the server may send the same header
in a response to indicate that the connection will be closed after
this response and so may not be used for the next request.

In the absence of the 'Connection: close' header, the connection
should remain open (though if idle it may be closed by either side
after some timeout).

HTTP/1.1 shouldn't maintain lots of connections to the same server
(and there is little or no benefit in doing so as a rule); from the
spec:

Clients that use persistent connections SHOULD limit the number of
simultaneous connections that they maintain to a given server. A
single-user client SHOULD maintain AT MOST 2 connections with any
server or proxy.

--
Scott Lawrence           EmWeb Embedded Server       <lawrence@agranat.com>
Agranat Systems, Inc.        Engineering            http://www.agranat.com/