Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Getting progress events on Socket *write* (not read)   Message List  
Reply | Forward Message #72018 of 149634 |
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.




Fri Apr 20, 2007 6:36 am

gibsonskayaker
Offline Offline
Send Email Send Email

Forward
Message #72018 of 149634 |
Expand Messages Author Sort by Date

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...
Tim
gibsonskayaker
Offline Send Email
Apr 20, 2007
1:08 pm

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...
Tim
gibsonskayaker
Offline Send Email
Apr 22, 2007
5:42 pm

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...
Manish Jethani
manish_jethani
Offline Send Email
Apr 22, 2007
7:20 pm

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...
Tim
gibsonskayaker
Offline Send Email
Apr 23, 2007
7:29 am

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...
Manish Jethani
manish_jethani
Offline Send Email
Apr 23, 2007
10:52 pm

That's a workaround, but you can't always write your own protocol. And, in this case, I can't (talking to Amazon SE) ... reason the ... and then ... a pretty ...
Tim
gibsonskayaker
Offline Send Email
Apr 24, 2007
11:20 am

... Apollo FileStream class dispatches OutputProgressEvent.OUTPUT_PROGRESS, the same should go here. At least in Apollo:(...
maliboo_pl
Offline Send Email
Apr 24, 2007
3:34 am

... The same here: Socket doesnt't dispatch/throws *ANY* kind of activity related to emptying output buffer after flush:( maliboo...
maliboo_pl
Offline Send Email
Apr 23, 2007
2:14 am

Hmm, as far as I know you can't really control such things with TCP sockets in general. I mean the TCP(/IP) itself doesn't enable to force sending the bytes...
Weyert de Boer
reyer_de_boer
Offline Send Email
Apr 23, 2007
3:08 am

TCP acks when packets have been received, this is how blocking sockets know when to return from blocking during a data write. Or to send events that data has...
Tim
gibsonskayaker
Offline Send Email
Apr 23, 2007
7:31 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help