473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Closing many CInternetSession objects

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
1 2075
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dustin lee | last post by:
Over the years I've gotten out of the habit of explicitly closing file objects (whether for reading or writing) since the right thing always seems to happen auto-magically (e.g. files get written...
4
by: James | last post by:
Quick question about closing recordsets and connection objects. We're in the process of rewriting a TON of bad code. None of it is even remotely tabbed properly, it's impossible to read half the...
1
by: Chris | last post by:
Hello, I have a program that uses the CInternetSession and CHttpConnection mfc classes to register the program...it works for the majority of our customers, but a few have received errors, all...
13
by: Simon Harvey | last post by:
Hi All, I have a colleague that I wprk with that develops using ASP. I develop using ASP.net. He seems to make sites much faster than me and I am wondering if its because of the two different...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
1
by: Barry | last post by:
Hi Does anyone know which is the equivalent class in C# for the MFC class "CInternetSession". TIA Barry
6
by: Steven D'Aprano | last post by:
Closing a file can (I believe) raise an exception. Is that documented anywhere? I've spent a lot of frustrating time trying to track this down, with no luck, which suggests that either my...
3
by: Yang | last post by:
Hi, I'm experiencing a problem when trying to close the file descriptor for a socket, creating another socket, and then closing the file descriptor for that second socket. I can't tell if my issue...
1
by: Paul Rubin | last post by:
it looks like contextlib.closing fails to be idempotent, i.e. wrapping closing() around another closing() doesn't work. This is annoying because the idea of closing() is to let you use legacy...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.