Well, no, *flush* isn't a blocking options, but to be fair, it really can't be in flash because of it's threading model.
What this means is that everytime you write data, it goes into an invisible buffer you have no visibility into and eats up memory until you exceed its limits and then pow! - it just dies. There is no way to write a robust application that uploads lots of data on the network. Flash needs to send an event which acks that data has been written. --- In [email protected], "Manish Jethani" <[EMAIL PROTECTED]> wrote: > > From looking at the API docs, my guess is that flush() is a blocking > operation that returns only when it's complete. If for some reason the > flush fails, it'll throw an I/O error. You could verify this by > writing a large amount of data to the buffer, calling flush() and then > pulling the plug on your machine. > > The docs don't say anything about the size of the buffer though. > > On 4/22/07, Tim <[EMAIL PROTECTED]> wrote: > > Any chance anyone well connected wants to discuss this? It's a pretty > > serious issue and really impairs the binary socket API, at least for > > uploading large amounts of data. > > > > --- In [email protected], "Tim" <tshephard@> wrote: > > > > > > Is there a way to get a progress event on a socket write (flush)? > > > > > > Right now, the way I understand it, if you write data to a socket you > > > have no way of knowing when the data has completely been flushed. > > > > > > This is a problem if you're writing a lot of data, because you could > > > blow that buffer .. guessing the bandwidth (eg: by testing it) isn't a > > > great solution either, for example, if you're on a wireless laptop > > > that bandwidth may fluctuate and your original guess might be wrong. > > > > > > I guess you could continue to test the bandwidth connection, but that > > > seems a bit unfortunate. Might be my only resolution here, though. > > > > > > Cheers, > > > > > > Tim. > > > > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > >

