Re: Is HTTP client thread-safe?

Giganews Newsgroups
Subject: Re: Is HTTP client thread-safe?
Posted by:  Martin James (mjames_falc…@dial.pipex.com)
Date: Thu, 4 Mar 2004

"Adam Clauss" <cabad…@tamu.edu> wrote in message
news:77EA55353E94E240cabad…@tamu.edu...
> I have a C# app in which I want/need to do many requests based upon the
same
> session.  After the initial setup of the connection, I would prefer to get
> multiple pages at once (all from various threads).  Is this safe to do
with
> the same HTTP object?  If not, is there a way to 'duplicate' the
connection
> and session into another HTTP object?

TidHTTP works fine in a thread, as Remy,Chad say.  I have an app on
long-term test now that has five threads, each having its own TidHTTP
component & polling different servers  If you need to maintain
session/context data for a set of TidHTTP/threads that are accessing
different pages on the same server, you will have to implement this yourself
with a page management layer above the threads.  I have never seen this
done.

Rgds,
Martin

Replies

In response to

Is HTTP client thread-safe? posted by Adam Clauss on Wed, 3 Mar 2004