On 8/31/05, Stefan Pantke <seaside dot ki at mac dot com> wrote:
> - When does DataAvailable really fires?
It fires when more data has been received, and you are able to read
more. If you don't read all of the data in the DataAvailable event,
and leave data on the buffer, it won't fire it again until more data
has arrived. So, the loop like you described can be quite common --
process chunks of data until we can't process anymore, and then wait
for the next event.
> - If new data arrives while DataAvailable is currently executing, can it
> overrun another DataAvailable event or will - when the current
> DataAvailable
> event finishes - another DataAvailble fire?
No, it will not execute it twice at the same time. DataAvailable is
always fired from the main thread, and thus cannot have two separate
execution paths. The next time through the event loop, the sockets
will be polled again, and if more data has become available, your
DataAvailable event will fire.
HTH,
Jon
--
Jonathan Johnson
REAL Software, Inc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|