Closing many CInternetSession objects

Discussion in 'C++' started by baronadav@yahoo.com, Jun 20, 2006.

  1. Guest

    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 20, 2006
    #1
    1. Advertising

  2. 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
    Victor Bazarov, Jun 20, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Skybuck Flying
    Replies:
    107
    Views:
    1,919
    Bruce Roberts
    Sep 26, 2005
  2. Chris
    Replies:
    1
    Views:
    2,932
    Jack Klein
    Jan 30, 2004
  3. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    641
    Thomas Hansen
    Feb 15, 2007
  4. Skybuck Flying
    Replies:
    106
    Views:
    1,611
    Bruce Roberts
    Sep 26, 2005
  5. thomas
    Replies:
    0
    Views:
    214
    thomas
    Oct 23, 2003
Loading...

Share This Page