|Example: TE_disconnect||Terminal Emulator Connection Functions|
Waits for terminal disconnection. (Windows only)
int TE_disconnect( unsigned int timeout );
|timeout||The maximum time (in milliseconds) to wait for the terminal emulator to disconnect. If omitted or less than 300 msec, the default timeout of 300 msec is used.|
TE_disconnect waits for the terminal to disconnect. If the function times out, it forcibly disconnects the terminal and then exits.
The TE_disconnect function is generated by VuGen when the terminal disconnects from a host. The estimated time between last user action and the disconnection is used as the disconnection timeout.
In LoadRunner versions prior to 12.50, TE_disconnect was not recorded. We recommended that you add TE_disconnect to older RTE scripts. Otherwise, the script will freeze in the Gradual Exiting stage if the terminal session did not finish disconnecting before a new connect command arrived. Add the TE_disconnect step after a function that instructs the terminal to disconnect or after the last function in the terminal session. For example, add TE_disconnect after
This function returns 0 if it succeeds, and a negative error code if it fails. It also sets the global variable TE_errno.