on 11/20/02 4:05 AM, [EMAIL PROTECTED] purportedly said:
> I am developing a kind of spider which download pages and all objects in
> that. So I am trying to keep the socket open to download all objects
> (images,...) and after that close it.
>
> I know the LWP::ConnCache way, but it's experimental so I don't know if
> it's a good option. Is it the only way to use Keep-Alive with
> LWP:UserAgent?. Where Can I find more documentation about that?.
By passing keepalive => 1 to the UA object on creation, you will activate
LWP's keepalive functionality. This is currently the only way to use
keepalive with LWP. You can:
$ perldoc LWP::UserAgent
for the docs. You may have to update your LWP if you haven't in some time.
In my experience, this functionality works fairly well. If you find that it
doesn't, you can go back to non-keepalive functionality. I haven't noticed
that keepalive improves performance much, so you may not even see a
difference.
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"