Hello everyone, I'm back, and i got good news, i finaly found what was going on :
It is simply a problem half open connection : The connection between the server and the client (using TWSocket) is forwarded althrough a Wifi connection (based on 868Mhz, which is really unstable). Sometimes when the server sent somes frames to the client, the server doesn't receive the ACK and the server close the connection from the client. But, this client doesn't know it, so TWSocket thinks the connection is still open... I checked it with netstat on both server and client and it is very clear now ! To better handle this situation, i changed KeepAlive timeout like that : mpWSocket->KeepAliveOnOff = wsKeepAliveOnCustom; mpWSocket->KeepAliveTime = 25 * 1000; And now, we clearly see that the socket closed itself after these 25 seconds without data received (when the Wifi is down) and try to reconnect... Sorry to loose your time, maybe it can help someone encoutered the same problem. Best, Alexandre. -----Message d'origine----- De : TWSocket [mailto:twsocket-boun...@lists.elists.org] De la part de Moro Alexandre Envoyé : mercredi 5 octobre 2016 08:44 À : 'ICS support mailing' Objet : Re: [twsocket] TWSocket Client Timeout. Hello Stephen, Thank you for sharing and giving me a way to search about. I searched about theses function in my whole source code but these are not used. I looked for something similar like low level code but i did not really find something interessting... So wait and see... -----Message d'origine----- De : TWSocket [mailto:twsocket-boun...@lists.elists.org] De la part de Stephen Dickason Envoyé : mardi 4 octobre 2016 18:52 À : ICS support mailing Objet : Re: [twsocket] TWSocket Client Timeout. Please pardon me for butting in. I can share what I found broke ICS for me and you can check if you have anything similar. I used a separate piece of low level code (not ICS) in my about form that displayed the host name and IP address of the user's PC, it used winsock.gethostname, WSAStartup($101,...) and WSACleanup. (I don't remember which one was the culprit.) This I found broke any open socket connections that I had and only way to see if they were broken was something like cmd's netstat -a. It was rather a bother, as not many people check the about box, so was quite random, showed no errors and was pretty annoying. I fixed it a long time ago by using internal ICS functions instead. Hope it helps. Stephen Dickason Senior Developer - Managed Services Email: sdicka...@elcb.co.za ELCB Information Services (Pty) Ltd Customer Service Email e...@elcb.co.za * www.elcb.co.za E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 Disclaimer > -----Original Message----- > From: TWSocket [mailto:twsocket-boun...@lists.elists.org] On Behalf Of > Moro Alexandre > Sent: Tuesday, October 4, 2016 17:19 > To: 'ICS support mailing' > Subject: Re: [twsocket] TWSocket Client Timeout. > > Hi Angus, > > Sorry to bother you, please find more details : > > In fact, an user use our application to retrieve data from a device by > a TCP connection throught TWSocket. > > The problem is that after a certain time (between 5 and 8 hours) the > data stop being received but TWSocket still indicate that it is connected. > > The user has reproduce the problem multiple times. > > This problem only appears since one year : when we have updated C++ > Builder and ICS : > > From Borland Builder 6 to Embarcadero XE3 From ICS 5.25 to ICS r1196. > > I do not have more details since i can not reproduce this problem myself. > But we are going to reproduce it this weekend. > > Finaly, i just see that you have fix some problems with timeout and > WSAESHUTDOWN in the version r1280 and r1279, so since it is related to > time maybe it fix my problem of 5/8 Hours... > > I cannot reproduce the original problem, unfortunately i cannot try it > for the moment ! > > Thanks again !!! > > Alexandre. > > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be