By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

Closing many CInternetSession objects

P: n/a
Greetings,

My application suppose to identify one web site for a pool of about 100
different websites.
i.e at any given time it is connected to only one website (say
google.com), however it does not know what is this website (it could be
yahoo.com, microsoft.com, etc).
Before it does anything else, it must first identify what website it is
connected to (i.e if it is google.com, yahoo.com,...)
To speed up things, the application uses many threads, each checks for
a different website from the pool. (i.e one thread checks if the
website is yahoo.com, the other thread checks if the website is
google.com, etc...)
I am using CInternetSession in each thread for the HTTP Get / Post
methods.
As soon as the first thread identify the website (say the thread that
checks if the website is google.com), it reports back and the
identification is done.

The problem is that the other threads are still active and the the
Internet sessions for those remain open (which could take some time
before they terminates since there are many threads and many
CInternetSession objects).

What I would like to do is, as soon as one of the threads successfully
identify the website, I would like to close all internet session
previously open by my application without the need to wait.

Any ideas?

Thanks

Jun 19 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ba*******@yahoo.com wrote:
My application suppose to identify one web site for a pool of about
100 different websites.
i.e [...]

The problem is that the other threads are still active [...]

What I would like to do is [...]

Any ideas?


Please look for an appropriate newsgroup to ask your question a bit
harder. I haven't found a trace of a C++ language problem in your
message.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jun 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.