> I have a TCP socket client. In some cases, OnDataReceived()
> gets fired for multiple times with ErrCode = 0
I never have seen a winsock error in OnDataAvailable. You can ignore the
check in that event safely.
> Receive() the return value is always -1 so the application can
> not read any data back. Because OnDataReceived() keeps getting fired,
> this freezes the application.
See my other reply. You have to check the return value and when it is <=
0 then just exit OnDataAvailable. Nothing will freeze.
Rgds, Wilfried [TeamICS]
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