Hello Alexandre, There is nothing preventing data from a TTimer event. Are you using "sync" functions or "async" functions ? Are you using wait loops ?
When you send data from TTimer event, is this "transparent" to the protocol you are using ? Maybe the data send from TTimer interfere with data sent (or received) from other parts of your program? -- [email protected] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -----Message d'origine----- De : TWSocket [mailto:[email protected]] De la part de Moro Alexandre Envoyé : vendredi 2 décembre 2016 13:44 À : 'ICS support mailing' Objet : Re: [twsocket] TWSocket Client Timeout. Hello ! I finaly found where comes from the problem : When the clients connects to my server, i send to everyone a lot of data from a TTimer. If i remove the SendStr() call, everything works fine !!! So please, 1) Can you explain me what is wrong in calling SendStr from a TTimer ? 2) How can this call, block every differents object based on TWSocket, server object and client object ? 3) Why there are no error event nor exception throw... Solution : 1) I tried to set mpWSocketServer->MultiThread = true; But it doesn't change anything... 2) Do i have to implement a Thread for all the SendStr be apart from the main thread ? I create a Thread, pass the TWSocketServer object as parameters, and a FIFO list with event. When i complete this list, the thread process the new data and SendStr... I'm shocked that this call can interfere seperate object... Thank you ! Best regards, Moro Alexandre. -----Message d'origine----- De : TWSocket [mailto:[email protected]] De la part de Moro Alexandre Envoyé : vendredi 2 décembre 2016 08:14 À : 'ICS support mailing' Objet : Re: [twsocket] TWSocket Client Timeout. I trying to investigate more and more and i see that i cannot open new sockets on the server, it refuse the connection, below is the packets captured in wireshark : Document joint : spuriousretransmission.pcapng The application i openned who crashed all the twsocket open two new socket on this server ! And in netstat the server socket are still in listenning state, (it happen on localhost and from a remote computer). Moreover the last 4 connection are in FIN_WAIT_2 Maybe it is a start... Moro Alexandre. -----Message d'origine----- De : TWSocket [mailto:[email protected]] De la part de Angus Robertson - Magenta Systems Ltd Envoyé : jeudi 1 décembre 2016 16:54 À : [email protected] Objet : Re: [twsocket] TWSocket Client Timeout. > In this time, did you already ear something like that with ICS ? > Have you any idea where data can be blocked, and in this state what > can i do more than inspecting by wireshark and netstat ??? If I understand you correctly, you want to keep remote TCP/IP sockets connected for several days at a time, presumably over a LAN or maybe a WAN? There are so many ways a connection can be lost, routers and switches, hardware issues, software interference, Windows Updates, etc. Even with keep alive, TCP/IP sockets can say connected but not be, the only reliable way is to send and echo data, a proper handshake. The probability of it being a bug in ICS that no-one else has noticed is highly unlikely, but not impossible, as explained previously I did fix a timeout issue that caused a socket to be closed earlier this year, which I found in one of my applications. You really need to find a way of bullet proofing your application, so it reconnects if nothing is received for x second/minutes/hours, or use regular handshaking for a more reliable and shorter timeout. Angus -- 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 -- 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
