Need a tip: array of Http Requests

Login to reply to this topic.
Mon, 2005-08-22 20:21
Joined: 2003-12-30
Forum posts: 93
Hi !

I need a piece of advice. My problem is quite simple :
I want to retrieve JPGs from the Internet and then to display them (after having converted them).

I currently have this architecture :

CPictureTile (single tile to load a JPEG) <-> CJpegDecoder -> HTTPClientEngine (retrieves the JPG from a URL).

So each CPictureTile contains it's own CJpegDecoder and it's own HTTPClientEngine.
I have an array of these CPictureTile. Unfortunately after 7-8 PictureTiles loadings, my programm crashes (approx 7-8 HTTP Requests were made).

CPictureTileList[0] -> Load and retrieve through HTTP-> http://mypic.jpg
CPictureTileList[1] -> Load and retrieve through HTTP-> http://mypic1.jpg
...etc

I'm aware that we can't do parallel HTTP Requests and using only one HTTPClientEngine object for my CPictureTile Array won't guarantee the independance of each tile ( I mean one tile can be loaded quicker than another one, and i don't have to wait for the tile n-1 has to be loaded to continue with HTTP connection).

How could I do it in a better way ?

Thx a lot in advance ! Cheezy

MatD

  • Login to reply to this topic.