Closing many CInternetSession objects

B

baronadav

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
 
V

Victor Bazarov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top