Sends command to TELNET server terminated by command terminator.
Namespace: Jscape.TelnetAssembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0
Syntax
C# |
---|
public string Send( string command ) |
Visual Basic |
---|
Public Function Send ( _ command As String _ ) As String |
Visual C++ |
---|
public: String^ Send( String^ command ) |
Parameters
- command
- Type: System..::..String
The command to send.
Return Value
The response from the TELNET server.
Remarks
Waits until the shell prompt is returned by TELNET server buffering
response data.
Note: The default timeout is 120 seconds.
Note: The default timeout is 120 seconds.
Examples
To send a command to the TELNET server, pass in the command to send.
The Send method automatically appends '\n' to the command.
CopySend
CopySend

// Send command to TELNET server. session.Send("ls -al");

' Send command to TELNET server. session.Send("ls -al")