Telnet Factory for .NET

TelnetTask.Timeout Property

Gets/Sets the timeout in milliseconds for a running tasks to receive the expected end prompt. Default timeout is 120000ms (120 seconds).

public long Timeout {get; set;}

Remarks

The timeout value is used to determine when a task should abort if the prompt is not detected within specified timeout.
Note: The timeout value set for a TelnetTask overrides the TelnetSession SessionTimeout property value. SessionTimeout for more information about setting the global timeout value for all tasks assigned to a TelnetSession.

Example

This example sets the task timeout to 6 seconds. The specified task will abort if not completed prior to the timeout expiration.

[CS]
// set task timeout to 6 seconds
myTask.Timeout = 6000;

[Visual Basic]
' set task timeout to 6 seconds
myTask.Timeout = 6000

See Also

TelnetTask Class | Jscape.Telnet Namespace