Share this page

# 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.

## Return Values

This function returns 0 if it succeeds, and a negative error code if it fails. It also sets the global variable TE_errno.

## Example

In this example, TE_disconnect waits for the default timeout of 300 milliseconds.

    TE_disconnect();

In this example, TE_disconnect waits for the specified timeout of 5000 milliseconds.

    TE_disconnect(5000);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: