Sorry, I am not sure I fully understand your question, but I'll try to answer it anyway.
Squid uses the ICP query key field for identifying which request a ICP query/response is for when there is multiple pending requests for the same URL. The ICP query key is a "random" integer embedded in the ICP query and returned in the ICP response. The commSelect(..., httpReadReply, ..) is installed on the HTTP connection to the origin server or parent cache as soon as Squid has sent the request. Persistent connections only come into account between two requests for the same server. When Squid has read the complete reply from the server and the connection can still be kept open for future use it places the connection in the persistent connection pool. On next request Squid first checks the persistent connection pool for an existing connection. If no open connection is found to the requested server a new connection is opened. The httpState keeps information Squid needs to know about the server connection while forwarding a HTTP request. This is returned to httpReadReply when there is data available to read on the server connection. It is not related to the client connection. Regards Henrik ons 2003-04-02 klockan 15.39 skrev zhuzf sina: > hi, > > i have an question about squid when i learn the codes. > if two clients send the different request to the same ICP, > squid will use the pConn to send those,is it right? > if your answer is yes.then, > if the first request is not sent completely or the first reply dont > come back,the second > request calls "commSetSelect(fd, COMM_SELECT_READ, httpReadReply, > httpState, 0)" > will replace the first's.the httpState will be changed when call > httpReadReply > to deal with the first request. > > maybe I comprehends the souce code is wrong.would you please answer > me? > > thanks very much! > > tiger
