Re: [twsocket] OnSessionClosed

2007-02-14 Thread Kochendoerfer, Michael
] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 3:38 PM To: twsocket@elists.org Subject: [twsocket] OnSessionClosed Hello, strange problem here: - two PCs connected via normal LAN - one runs my server app (simple TWSocket since the server only

Re: [twsocket] OnSessionClosed

2007-02-14 Thread Wilfried Mestdagh
Hello Markus, This is how TCP works. OnSessionClosed is fired when the other end say Goodbye, or when you try to send something and the other end is not their anymore. There is no traffic if there is no data send, so TCP layer cannot know if for example cable is plugged out. So you have to do

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