New topic: Waiting for socket to download when using asych sockets
<http://forums.realsoftware.com/viewtopic.php?t=37041> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message mm_flynn Post subject: Waiting for socket to download when using asych socketsPosted: Wed Jan 12, 2011 2:54 am Joined: Thu Oct 19, 2006 2:04 pm Posts: 11 I have an application which I believe is intrinsically sequential in nature ie. 1 - Download a file 2 - If it is OK unzip the file 3 - Do things with the file 4 - If Something=True then repeat the process with another URL I under stand how to achieve this with synchronous sockets however I need progress bars and some of the other events. I have bodged a solution but am interested in any better ways to do this (also this solution no longer works for certain SecureSocket cases in 2010R5) The way I have co-ordinated the calling thread with the socket is to add a property to the socket of CallingThread as thread. In the PageReceived and Error events have CallingThread.resume so my code looks like socket.Callingthread = self socket.get(URL) self.sleep // then carry on with the rest of the logic Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
