ertank 27 Posted May 22, 2023 (edited) Hello, I am using v8.71 of ICS. There is a device connecting to my application and sending some data. So, I basically wait for a connection and communicate with that device both ways. Occationally, TWSocketClient.OnDataAvailable event triggers even if there is no data ( aka GetRcvdCount = -1) I just wonder if this is normal and what might be possible reasons? Thanks & Regards, Ertan Edited May 22, 2023 by ertank Share this post Link to post
Angus Robertson 574 Posted May 22, 2023 Yes, this is normal behaviour, better to have DataAvailable trigger too often than miss potential data. Sorry, can not tell you why it was designed that way 25 years ago... Angus Share this post Link to post
Fr0sT.Brutal 900 Posted May 23, 2023 AFAIR GetRcvdCount was marked as not 100% proof somewhere in the code and it was always recommended to try Recv in trigger. Share this post Link to post