Dart Telnet Control
SendCommand Method
Specifies the desired Telnet command.
Integer or OptionConstants. Specifies the desired Telnet option.
String or Byte array. Specifies the Telnet suboption to be used.
Defaults to False. Specifies that the option should be sent as urgent (out-of-band) data. The telnetDataMark option, for example, should be sent using this flag.
Description
Send a Telnet command sequence. The Telnet Control ensures all formatting is accomplished correctly. This method is normally called from within the Command event.
Syntax
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
Parameters
Command
ValueDescription
telnetAbortOutputThe function AO.
telnetAreYouThereThe function AYT.
telnetBreakNetwork Virtual Terminal (NVT) BRK.
telnetDataMarkThe data stream portion of a Synch.
telnetDoAsk the Telnet host to DO the specified option.
telnetDontAsk the Telnet host to NOT DO the specified option.
telnetEraseCharacterThe function EC.
telnetEraseLineThe function EL.
telnetGoAheadThe GA Signal.
telnetIacThe Interpret as Command signal.
telnetInterruptProcessThe function IP.
telnetNoOperationThe Telnet client WILL agree to the specified option.
telnetSubOptionIndicates that what follows is sub-negotiation of the indicated option.
telnetSubOptionEndEnd of sub-negotiation parameters (not used by application)
telnetWillThe Telnet client WILL agree to the specified option.
telnetWontThe Telnet client WONT agree to the specified option.
Specifies the desired Telnet command.
Option
ValueDescription
telnet3270RegimeControls the 3270 Regime option.
telnetAuthenticationControls the Authentication option.
telnetByteMacroControls the Byte Macro option.
telnetCharacterSetControls the Character Set option.
telnetComPortControls the COM Port option.
telnetDataEntryTerminalControls the Data Entry Terminal option.
telnetEchoControls echoing
telnetEndOfRecordControls the end of record option.
telnetEnvironmentControls the Enviroment option.
telnetExtendedASCIIControls the Extended ASCII option.
telnetExtendedOptionsListControls the Extended Options List option.
telnetLineModeControls the Line Mode option.
telnetLogoutControls the Logout option.
telnetNewEnvironmentControls the New Environment option.
telnetOutputMarkingControls the Output Marking option.
telnetSendLocationControls the Send Location option.
telnetStatusControls the Status option.
telnetSUPDUPOutputControls the SUPDUP Output option.
telnetSupressGoAheadsSuppresses GoAhead signalling
telnetTACACSUserIdentificationControls the TACACS User Identification option.
telnetTerminalLocationControls the Terminal Location option.
telnetTerminalTypeControls terminal type
telnetTimingMarkControls the Timing Mark option.
telnetToggleFlowControlControls the Flow Control option.
telnetTransmitBinaryControls the Transmit Binary option
telnetWindowSizeControls terminal window size
telnetX3PadControls the X.3 Pad option.
telnetXDisplayLocationControls the X Display Location.
Integer or OptionConstants. Specifies the desired Telnet option.
SubOption
String or Byte array. Specifies the Telnet suboption to be used.
Urgent
Defaults to False. Specifies that the option should be sent as urgent (out-of-band) data. The telnetDataMark option, for example, should be sent using this flag.
Return Value
Number of bytes sent.
Remarks

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):

 

See Also

Telnet Object  | Telnet Members


Documentation Version 1.9.3.0
© 2020 Dart Communications. All Rights Reserved.
Send comments on this topic