Telnet Object : SendCommand Method |
Visual Basic |
---|
Public Function SendCommand( _ ByVal Command As CommandConstants, _ Optional ByVal Option As OptionConstants = telnetTransmitBinary, _ Optional ByRef SubOption As Variant, _ Optional ByVal Urgent As Boolean = False _ ) As Long |
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. |
You can use this method only when the State property is tcpConnected; otherwise, a ptNotConnected error is generated.
If Command is... | Then... |
---|---|
telnetWill, telnetWont, telnetDo, or telnetDont | Only the Option parameter is required. |
telnetBreak, telnetInterruptProcess, etc. | No additional parameters are required. |
telnetDataMark | No additional parameters are required except for Urgent (use True). |
The Telnet Control uses an internal check to protect the using application from non-terminating acknowledgment loops.
Refer to RFC 854 and RFC 855, as well as RFCs for the desired Telnet option for further information.
Error Codes
The SendCommand method may generate the following error codes (refer to the ErrorConstants topic for a complete list of error codes):