That's a workaround, but you can't always write your own protocol. And, in this case, I can't (talking to Amazon SE)
--- In [email protected], "Manish Jethani" <[EMAIL PROTECTED]> wrote: > > If flush() is asynchronous, and there's no acknowledgement when the > data has been sent (which is weird), then you'll have to build this > into your application-level protocol. Send an acknowledgement from the > server for every "packet" received. > > On 4/23/07, Tim <[EMAIL PROTECTED]> wrote: > > 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" > > <manish.jethani@> 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 <tshephard@> 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > 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 > > > > > > > > >

