Re: [twsocket] Detecting broken connection and reestablishing

2010-10-07 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote: >> However I wonder why one has to detect a brocken, idle connection >> at all? > > One of applications captures data from various appliances, such a call > data records from telephone switches. If the connection with the > telephone switch is lost, CR

Re: [twsocket] Detecting broken connection and reestablishing

2010-10-07 Thread Angus Robertson - Magenta Systems Ltd
> However I wonder why one has to detect a brocken, idle connection > at all? One of applications captures data from various appliances, such a call data records from telephone switches. If the connection with the telephone switch is lost, CRDs are lost as is the revenue from rebilling those tel

Re: [twsocket] Detecting broken connection and reestablishing

2010-10-07 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote: >> The only reliable way to detect a broken connection is to send or >> receive something. Then if the connection is gone OnSessionClosed >> will fire, and from there start your timer to reconnect. > > That is what the keep alive options do presumably,

Re: [twsocket] Detecting broken connection and reestablishing

2010-10-07 Thread Angus Robertson - Magenta Systems Ltd
> The only reliable way to detect a broken connection is to send or > receive something. Then if the connection is gone OnSessionClosed > will fire, and from there start your timer to reconnect. That is what the keep alive options do presumably, on an idle connection, if keep alive fails the sess

Re: [twsocket] Detecting broken connection and reestablishing

2010-10-06 Thread Arno Garrels
Markus Humm wrote: > I've got a TWSocket with a TCP connection to some server. > Now how to find out if the connection got broken and if, how to > reestablish it? The only reliable way to detect a broken connection is to send or receive something. Then if the connection is gone OnSessionClosed wi

[twsocket] Detecting broken connection and reestablishing

2010-10-06 Thread Markus Humm
Hello, I've got a TWSocket with a TCP connection to some server. Now how to find out if the connection got broken and if, how to reestablish it? My current attempt is in the sending routine of mine, if not everything could be sent the connection is believed to be broken and it is closed on TWSock