Login  
Search All Forums
Dart Home | PowerTCP Telnet for .NET | Custom Development Reply | PowerTCP Telnet for .NET Topics | Forums   
AuthorForum: PowerTCP Telnet for .NET
Topic: .Connected
jiggatheog

From: Newbury, United Kingdom
Posts: 3
Member Since: 07/24/06
posted July 26, 2006 5:38 AM

Hi,

I am building a tool which manages several Telnet sessions. Initially, I connect to the IP addresses in a list, reporting failed connections as they occur. Once I have a set of connections, I trigger a timer which checks the .Connected property of each active session every 5 seconds (to check for lost connections). 

Under what conditions is the .Connected property updated to 'False' if a connection already exists?

I established a single connection upon which the timer was triggered to check the .Connected property of that session periodically. After a while, I physically unplugged the LAN connection to of the remote machine. The .Connected property remained as 'True'. 

Please help, my timer code is below:

Dim i as Integer

For i = 0 To Me.ListBox1.Items.Count - 1

If TelnetAr(i).Connected Then

Me.ListBox2.Items.Item(i) = "Y"

Else

Me.ListBox2.Items.Item(i) = "N"

End If

Next

///Note TelnetAr() is a Public array of Telnet sessions created during the 'Connection' phase.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 26, 2006 12:42 PM

Unless there is a receive pending, you will not see the state change until you attempt to send or receive data. In order to do what you want, you will need to modify your registry to support KeepAlive packets, then set the KeepAlive property to True.

Please see this link for info on enabling KeepAlive:
http://www.winguides.com/registry/display.php/891


Reply | PowerTCP Telnet for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX