To send data you may use the TelnetSession#send, TelnetSession#sendWait, or TelnetSession#sendNoWait method. The functionality and differences of these are described below. See JavaDoc for more details.
Method
|
Description
|
TelnetSession#send
|
Sends command and waits for the session shell prompt to return.
Returns a string containing all data received from telnet server between the time the command was issued and the session shell prompt was received.
|
TelnetSession#sendWait
|
Sends command and waits for the specified prompt to return. This prompt may differ from the current session shell prompt.
Returns a string containing all data received from telnet server between the time the command was issued and the specified prompt was received.
|
TelnetSession#sendNoWait
|
Sends command and immediately returns. This is useful in cases where you want to send an "exit" or "logout" command and no shell prompt is expected to return.
|
|