I have a socket which downloads a file with my blog data as follows.
I split the file into an array to load (no problem so far)
3 'number of post
photo url
text url
photo url
text url
photo url
text url
When I try and FileLoaderSocket2 I get errors because socket 1 hasn’t finished receiving the info I am guessing
FileLoaderSocket1
// If the authentication request was successful…
If HTTPStatus = 200 Then
// Convert the response content to text.
URL = Xojo.Core.TextEncoding.UTF16LittleEndian.ConvertDataToText(Content)
Lines() = URL.Split(&u0A)
Dim a As text
a = lines(0).right(1)
newsfeedtotal = Integer.FromText(a)
dim b as text
for x as integer = 0 to NewsFeedTotal-1
b = “http://www.sallyfitz.com/AppData/Fan/”+x.ToText + “.jpg”
FileLoaderSocket2.Send(“GET”, a)
next x
Else
'message
End If
What would be the a more efficient approach given that I need to download the first file to see how many picture and text files need to be subsequently downloaded?