Thread View: borland.public.cppbuilder.internet.socket
4 messages
4 total messages
Started by Omar Zelaya
Fri, 03 Aug 2007 21:23
TIdTelnet Disconnect Event Question
Author: Omar Zelaya
Date: Fri, 03 Aug 2007 21:23
Date: Fri, 03 Aug 2007 21:23
15 lines
1354 bytes
1354 bytes
Hi, I'm using CB2007 and Indy 10, I was doing some test with TIdTelnet i have noticed two things: 1.When the server disconnects the the session, the Disconnect event is not called. 2. When the form that contains the TIdTelnet components is closed, the disconnect event is called, even if i just open and close the form(dont connect, etc). Are this two behaviours normal? Thanks in Advance Omar Zelaya
Re: TIdTelnet Disconnect Event Question
Author: Omar Zelaya
Date: Fri, 03 Aug 2007 21:28
Date: Fri, 03 Aug 2007 21:28
25 lines
1696 bytes
1696 bytes
I have found the answer for #1, by reading the help... :) , now how can i catch a server disconnect for a telnet client? Thanks in advance Omar Zelaya "Omar Zelaya" <ozelaya2010@hotmail.com> wrote in message news:46b39cfa@newsgroups.borland.com... > Hi, > I'm using CB2007 and Indy 10, I was doing some test with TIdTelnet i have > noticed two things: > > 1.When the server disconnects the the session, the Disconnect event is not > called. > 2. When the form that contains the TIdTelnet components is closed, the > disconnect event is called, even if i just open and close the form(dont > connect, etc). > > Are this two behaviours normal? > > Thanks in Advance > > Omar Zelaya >
Re: TIdTelnet Disconnect Event Question
Author: Remy Lebeau (TeamB)
Date: Sat, 04 Aug 2007 02:25
Date: Sat, 04 Aug 2007 02:25
21 lines
1462 bytes
1462 bytes
"Omar Zelaya" <ozelaya2010@hotmail.com> wrote in message news:46b39cfa@newsgroups.borland.com... > When the server disconnects the the session, the Disconnect > event is not called. It is not supposed to be. Indy clients are not event-driven. OnDisconnect is only triggered when the Disconnect() method is called. > When the form that contains the TIdTelnet components is > closed, the disconnect event is called Because Disconnect() is being called. > Are this two behaviours normal? Yes. Gambit
Re: TIdTelnet Disconnect Event Question
Author: Remy Lebeau (TeamB)
Date: Sat, 04 Aug 2007 02:26
Date: Sat, 04 Aug 2007 02:26
14 lines
1474 bytes
1474 bytes
"Omar Zelaya" <ozelaya2010@hotmail.com> wrote in message news:46b39e2f@newsgroups.borland.com... > how can i catch a server disconnect for a telnet client? You can try using the OnStatus event, but there is nothing else beyond that that gets triggered for that condition. An exception is raised the next time you try to access the socket after it has been disconnected. You are supposed to be writing your code to be exception-aware. That is how Indy is designed to be used. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads