Re: [twsocket] OnSessionClosed not always triggered

2006-03-19 Thread Wilfried Mestdagh
Hi Dod, Did some additional research. If you wants to use TWSocketClient instead of TWSocket to initiate a connection, then you have to set FSessionClosedFlag := False; in the OnSessionClosed event. If you do not then OnSessionClosed will not trigger a second time. --- Rgds, Wilfried [TeamICS]

Re: [twsocket] OnSessionClosed not always triggered

2006-03-19 Thread Dod
Hello Wilfried, Yes, I came to same conclusion too when you told me it worked fine with TWSocket. Now I simply set FSessionClosedFlag:=False before calling .Connect again and all is fine. I also added some FConnectDidError:=ErrCode in OnSessionConnected so

[twsocket] OnSessionClosed not always triggered

2006-03-18 Thread Dod
Hello, I am actually doing some crash test on my server to handle as many situations as possible. I have a problem in a failed socket .Connect I create a few sockets to .Connect them to some remote points. The .Connect will excecute and fail because there is nothing listening on

Re: [twsocket] OnSessionClosed not always triggered

2006-03-18 Thread Wilfried Mestdagh
Hello Dod, In the SessionClosed I start a Timer that will send a message 20 second later to retry a .Connect, This is the correct way to do it. but this new try will only produce a OnSessionConnected not followed by a SessionClosed Never had that situation. In al my automated