Arno Garrels wrote:
> Jack wrote:
>> Hello all,
>> 
>> I have a TCP socket client. In some cases, OnDataReceived()
> 
> There's no such event in ICS named OnDataReceived.
> 
>> gets fired for multiple times with ErrCode = 0, but when I call
>> Receive() the return value is always -1 so the application can
>> not read any data back.
> 
> If that happens in TWSocket's OnDataAvailable event it means that
> the connection was closed, just ignore it, OnSessionClosed will
> be triggered later on.

Sorry mixed it up with with a 0 result 0 means a closed connection,
-1 means an error, check LastError.  

> 
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> 
> 
>> Because OnDataReceived() keeps getting fired,
>> this freezes the application. Any idea why this is happening?
>> In my particular case, the buffer is valid and has a size of
>> 480000 bytes. The application does this operation repeatedly.
>> The first time, or the first few times always work well.
>> 
>> --
>> Best regards,
>> Jack
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to