[twsocket] OnDataAvailable received twice

Stephen Williams SWilliams@fm.optus.net.au
Tue, 13 Jun 2000 14:21:29 +1000


What is the length of data received in both cases?  If the return value of
Receive is less than or equal to zero, then simply exit the event handler.
This is a known issue, but can simply be worked around by the above solution
with no side effects.

Steve 'Sly' Williams
IT Development
Cable & Wireless Optus Outsourcing Services
swilliams@fm.optus.net.au
------------------------------------------------------------
(On the difference between men and women:) "On the one hand, we'll never
experience childbirth. On the other hand, we can open all our own jars."
------------------------------------------------------------

> Hi, I've posted this problem bafore and thanks to Stephen for
> respondingand his suggestions. But still I'm having the 
> problem. So back
> to basic, I test the examples that came with ICS. To my supprise, the
> example also having the same problem. I compiled and execute 
> udpsend and
> udplstn example and the ondataavilailable event is fired twice. To
> confirm this, I make a variable int Count and set it to 0 before
> listening and increase the counter each time the OnDataAvailable was
> fired.
> 
> FYI, I'm using BCB4 on a Win98 box. I've test on several computers in
> but still getting the same result. Any idea why is this happening?
> 
> Cheers,
> Azrin