回复:Re: Puzzled at "clientHTTPRequest"

From: <maer727@dont-contact.us>
Date: Wed, 10 Apr 2002 11:17:40 +0800 (CST)

Thanks, Henrik pal!

I still have a question. In your reply, you mentioned,

///////////////////////////////////////////////////////////////////
At a given time only one clientHttpRequest is active for a ConnStateData. If
there is more than one request sent by the client then the others just sit
there waiting for their turn (deferred).
///////////////////////////////////////////////////////////////////

Do you mean there is only one ConnStateData in the whole Squid system? Or do you mean there
is only one ConnStateData associated with a specific client? But if the latter case is true, how to identify
a client from other clients? Using IP? Using hostname? Using sockets(ports) binding to a specific IP?
I am not very familiar with ConnStateData. :-)

Can you give me a simple explanation?

Best regards,
George, Ma

----- 原文 -----
From: Henrik Nordstrom
To: maer727@sohu.com
Cc: squid-dev@squid-cache.org
Subject: Re: Puzzled at "clientHTTPRequest"
Sent: Tue Apr 09 23:12:07 CST 2002

> maer727@sohu.com wrote:
> > Hi, pals.
> >
> > I meet a trouble when reading client_side.c, function
> > "clientCreateStoreEntry". In this function, exists a variable named h. It
> > is an variable of structure "clientCreateStoreEntry".
>
> h is a clientHttpRequest. It contains the details of the client connection
> and the HTTP request received on this connection.
>
> > I think the structure "StoreEntry" is to do with cached object.
> > "Storeclient" is to do with client. But I do not know the purpose of the
> > structure "clientHTTPRequest". What is the relationship between the three
> > structures?
>
>
> The client connection gets accepted and assigned a ConnStateData.
>
> Client sends a request. The request gets parsed into a request_t, and the
> information about the request and client is collected into a
> clientHttpRequest, linked to the ConnStateData.
>
> At a given time only one clientHttpRequest is active for a ConnStateData. If
> there is more than one request sent by the client then the others just sit
> there waiting for their turn (deferred).
>
> A StoreEntry is the central structure describing an URL object within Squid.
>
> Data is read from a StoreEntry using a store_client.
>
> When client_side.c processes the current clientHttpRequest for a
> ConnStateData it uses a store_client to read data from the StoreEntry.
>
> when client_side starts processing a clientHttpRequest, it checks if there
> exists a StoreEntry for the requested object in the cace. If not it creates a
> new StoreEntry and initiates the retreival of a copy from the Internet into
> this StoreEntry. The retreival "process" is sent the request_t.
>
> Regards
> Henrik
>
>
Received on Tue Apr 09 2002 - 21:17:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:00 MST