[Twisted-web] HTTPClient vs. HTTPClientFactory

Andrew McNabb amcnabb at mcnabbs.org
Fri Apr 18 12:51:56 EDT 2008

On Fri, Apr 18, 2008 at 07:18:23PM +1000, Andrew Bennetts wrote:
> To put it another way, there's a ClientFactory because even though there's often
> only a single client connection, something still needs to build the protocol
> instance for the connection.  The factory is that something.

I appreciate the answers I've been given.  I definitely feel more
confident about how all of this works.

In the specific case of the HTTPPageGetter and HTTPClientFactory, I
don't understand why the HTTPClientFactory does anything at all.  It
seems that it should create a deferred and get out of the way.  Maybe it
would set up the URL, too.

I'm really confused by why the HTTPClientFactory defines gotHeaders,
gotStatus, page, noPage, etc.  It seems to blur the distinction between
HTTPPageGetter and HTTPClientFactory and create lots of points where a
HTTPPageGetter object has to make calls into its factory.  Again, it
seems like it would make more sense if all of that happened right in the

Is there something I'm still not understanding?  Thanks again for the
helpful answers.

Andrew McNabb
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20080418/8ad3c517/attachment.pgp

More information about the Twisted-web mailing list