| Dart Home | PowerTCP Emulation for ActiveX | Custom Development | Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Emulation / Telnet for ActiveX Topic: Login or Option negotiation delays when blocking |
| ja928 From: Canton, OH USA Posts: 17 Member Since: 03/31/04 |
posted April 15, 2004 4:56 PM Has anyone seen something like this? I have some applications which use the ActiveX version of the Telnet control. When I connect and "manually" log on to the VMS server, I enter my UserName and my Password and then a menu appears within a second. However, when I run equivalent commands scripted, it takes about 10 seconds for the menu to appear. In the scripted scenario, I often get two messages back: %SET-W-NOTSET, error modifying TNA2745: and then -SET-I-UNKTERM, unknown terminal type These do not appear when I am logging on unscripted. The messages do not interrupt processing. I have the following settings: TermType = "vt320" AutoOption = True TimeOut = 30000. Dim sData As String = "" Dim loginTokens As DartSock.DartStrings = New DartSock.DartStrings With loginTokens .Add("________") .Add("User authorization failure") .Add("YOUR PASSWORD WILL EXPIRE IN") End With 'loginTokens Dim objVt As Vt = ActiveVT() Dim objTN As AxDartTelnet.AxTelnet = ActiveTN() If objTN Is Nothing Then Exit Sub If objVt Is Nothing Then Exit Sub With objVt .NewLine = NewLine.Cr .Clear() .Focus() End With 'objVt ' Abort if connected With objTN If .CtlState = StateConstants.tcpConnected Then .Close() End If .AutoOption = True ' Perform auto-option negotiation for TELNET '.Trace("c:\login.log", True, True, vbCrLf & "App>" & vbCrLf, vbCrLf & "SVR>" & vbCrLf) .Connect(g_sTelnetHost, g_sTelnetPort) .Search(sData, "Username: ") sData = "" .Send(g_sDpUid & Chr(13)) .Search(sData, "Password: ") sData = "" .Send(g_sDpPass & Chr(13)) .Search(sData, loginTokens) 'This is the bottleneck objVt.Write(sData) End With 'objTn Please note that ActiveVT and ActiveTN are functions that identify which of several VT and TN objects to use. This code is in .Net but the VB6 code behaves the same. I am using the earlier version of the Telnet because I need to search for multiple logintokens. |
| ja928 From: Canton, OH USA Posts: 17 Member Since: 03/31/04 |
posted July 15, 2004 9:28 AM I figured it out. Unscripted, there are a few other messages which are received before my "________" prompt. It looks like my program needs to actively send the Option negotiation strings. Doing this, I can now connect and login in under a second. |
| Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|