Sends command to TELNET server terminated by command terminator.

Namespace: Jscape.Telnet
Assembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0

Syntax

C#
public string SendWait(
	string command,
	string prompt
)
Visual Basic
Public Function SendWait ( _
	command As String, _
	prompt As String _
) As String
Visual C++
public:
String^ SendWait(
	String^ command, 
	String^ prompt
)

Parameters

command
Type: System..::..String
The command to send.
prompt
Type: System..::..String
The prompt returned by the TELNET server..

Return Value

The response from the TELNET server.

Remarks

Waits until the prompt is returned by TELNET server buffering response data.
Note: The default timeout is 120 seconds.

Examples

To send a command to the TELNET server, pass in the command to send, and the prompt to wait for. The SendWait method automatically appends '\n' to the command.
CopySendWait
// Send command to TELNET server.
session.SendWait("passwd", "Enter new password:");

CopySendWait
' Send command to TELNET server.
session.SendWait("passwd", "Enter new password:")

See Also