Telnet Object : Command Event |
Visual Basic |
---|
Public Event Command( _ ByVal Command As CommandConstants, _ ByVal Opt As OptionConstants, _ ByRef SubOption As Variant _ ) |
Value | Description |
---|---|
telnetAbortOutput | The function AO. |
telnetAreYouThere | The function AYT. |
telnetBreak | Network Virtual Terminal (NVT) BRK. |
telnetDataMark | The data stream portion of a Synch. |
telnetDo | Ask the Telnet host to DO the specified option. |
telnetDont | Ask the Telnet host to NOT DO the specified option. |
telnetEraseCharacter | The function EC. |
telnetEraseLine | The function EL. |
telnetGoAhead | The GA Signal. |
telnetIac | The Interpret as Command signal. |
telnetInterruptProcess | The function IP. |
telnetNoOperation | The Telnet client WILL agree to the specified option. |
telnetSubOption | Indicates that what follows is sub-negotiation of the indicated option. |
telnetSubOptionEnd | End of sub-negotiation parameters (not used by application) |
telnetWill | The Telnet client WILL agree to the specified option. |
telnetWont | The Telnet client WONT agree to the specified option. |
Value | Description |
---|---|
telnet3270Regime | Controls the 3270 Regime option. |
telnetAuthentication | Controls the Authentication option. |
telnetByteMacro | Controls the Byte Macro option. |
telnetCharacterSet | Controls the Character Set option. |
telnetComPort | Controls the COM Port option. |
telnetDataEntryTerminal | Controls the Data Entry Terminal option. |
telnetEcho | Controls echoing |
telnetEndOfRecord | Controls the end of record option. |
telnetEnvironment | Controls the Enviroment option. |
telnetExtendedASCII | Controls the Extended ASCII option. |
telnetExtendedOptionsList | Controls the Extended Options List option. |
telnetLineMode | Controls the Line Mode option. |
telnetLogout | Controls the Logout option. |
telnetNewEnvironment | Controls the New Environment option. |
telnetOutputMarking | Controls the Output Marking option. |
telnetSendLocation | Controls the Send Location option. |
telnetStatus | Controls the Status option. |
telnetSUPDUPOutput | Controls the SUPDUP Output option. |
telnetSupressGoAheads | Suppresses GoAhead signalling |
telnetTACACSUserIdentification | Controls the TACACS User Identification option. |
telnetTerminalLocation | Controls the Terminal Location option. |
telnetTerminalType | Controls terminal type |
telnetTimingMark | Controls the Timing Mark option. |
telnetToggleFlowControl | Controls the Flow Control option. |
telnetTransmitBinary | Controls the Transmit Binary option |
telnetWindowSize | Controls terminal window size |
telnetX3Pad | Controls the X.3 Pad option. |
telnetXDisplayLocation | Controls the X Display Location. |
Private Sub Telnet1_Command(ByVal Command As DartTelnetCtl.CommandConstants, ByVal Opt As DartTelnetCtl.OptionConstants, SubOption As Variant) On Error GoTo OnError ' use intrinsic error handling Select Case Command Case telnetSubOptionEnd ' server wants to negotiate a sub-option If Opt = telnetTerminalType Then ' negotiate TermType suboption for VT320 Telnet1.SendCommand telnetSubOption, Opt, Chr$(0) & "vt320" ElseIf Opt = telnetWindowSize Then ' want the server to set a window size of 80x32 Telnet1.SendCommand telnetSubOption, Opt, Chr$(0) & Chr$(80) & Chr$(0) & Chr$(32) End If Case telnetDo ' server wants us to enable an option If Opt = telnetTerminalType Then ' want to subnegotiate TermType Telnet1.SendCommand telnetWill, Opt ElseIf Opt = telnetWindowSize Then ' want to subnegotiate Window Size Telnet1.SendCommand telnetWill, Opt Else ' refuse any other option being requested Telnet1.SendCommand telnetWont, Opt End If Case telnetDont ' server wants to disable option&ldots;agree to it Telnet1.SendCommand telnetWont, Opt Case telnetWill ' server wants to enable an option If Opt = telnetSupressGoAheads Then ' do suppress go-aheads Telnet1.SendCommand telnetDo, Opt ElseIf Opt = telnetEcho Then ' do echo characters sent Telnet1.SendCommand telnetDo, Opt Else ' we don't agree to anything else Telnet1.SendCommand telnetDont, Opt End If Case telnetWont ' fine with us Telnet1.SendCommand telnetDont, Opt End Select Exit Sub OnError: ' Any error jumps here Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description End Sub