LNET CanSend is not always triggerd [Source attached now] lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- MaartenJB · 2019-12-30 11:39 Hi, I've go a simple lnet client server, the client sends data to the server, but once out of about 10 times the "CanSend" is not being triggered on the client side. When I do a manual trigger like this: "TcpClientCanSend( TcpClient.Iterator )" the sending continues successfully. Does anyone have a clue what this can be? Best regards, Maarten ---------------------------------------------------------------------- MaartenJB · 2019-12-31 11:29 I've attached the source of a very basic application that shows the problem. It automatically connects and disconnects and detects if a CanSend has been fired or not. Sometimes it fails right away, sometimes it takes a while. When it fails there is a button "Force CanSend" and when pressed it continues. I've also attached two pictures, one of how it should look and one where the CanSend is not fired. ---------------------------------------------------------------------- MarkMLl · 2019-12-31 11:55 What OS is this with? I did some maintenance on that years ago (adding Telnet subcommands IIRC) but from discussion at the time I'm not sure the support state... I think lnet was intended more as something used during installation etc. than for heavyweight development. MarkMLl ---------------------------------------------------------------------- MaartenJB · 2019-12-31 12:44 Hi Mark, This is on Windows 10 (1809). I've tested it on multiple computers. ---------------------------------------------------------------------- MarkMLl · 2019-12-31 13:24 I suspect you've just become the local expert :-) MarkMLl ---------------------------------------------------------------------- MaartenJB · 2020-01-02 07:44 Aaah, that's not a good thing :-) What component is recommend to use for IP communication in free pascal? ---------------------------------------------------------------------- MarkMLl · 2020-01-02 09:18 Sorry, can't answer that one since my use cases tend to be "unusual" which usually results in my going direct to low-level functions. I've used lnet for a Telnet terminal emulator (to the Hercules mainframe emulator etc.) and in that role it appeared reliable, but the code isn't in day-to-day use so if something only went wrong every thousand messages or so I might not have noticed. Hopefully somebody else has an opinion, but if not I suggest starting a new thread with a concise description of what you're trying to do in the subject line. MarkMLl