logo       

Breaking a keep alive connection: msg#00048

lang.perl.modules.lwp

Subject: Breaking a keep alive connection

I'm using keep alives and the form of $ua->get() that uses a callback
function to read the data as it arrives.

If the callback function dies will the connection always be broken?
That is, will the next request to that server be a new connection, not
an existing open connection from a previous keep alive request?

I assume if I've only read the first chunk out of a very large
response then the connection will be broken. But, I'm not clear what
happens if the fetched document is very small (like the first chunk is
the entire document).

Does size matter? Or would LWP drop the connection regardless?

Also, is there a way to ask LWP if a request would be to an open
connection before making the actual connection?

--
Bill Moseley
moseley@xxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise