ctrx_disconnect_server

ExampleConnection Functions

Disconnects a Citrix client from a Citrix server.

int ctrx_disconnect_server( char *server_name, [CONTINUE_ON_ERROR,] CTRX_LAST );

server_nameThe name of the Citrix ICA server
CONTINUE_ON_ERROR A constant, entered as shown without quotes. Overrides the error behavior runtime setting for this step so that script behaves as though the runtime setting was Continue on error.
CTRX_LAST A marker that indicates the end of the argument list.

ctrx_disconnect_server disconnects a client from a Citrix server.

Note: The ICA server should also be configured to disconnect from the client on a broken or timed-out connection. Refer to the section "Server Configuration" in the Virtual User Generator Help Center (select the relevant version).

Return Values

Citrix ICA Return Values

Parameterization

No parameterization is available for this function.

Example

In the following example, after connecting to the server ludens and opening Microsoft's Internet Explorer application, the function ctrx_disconnect_server disconnects from the server.

Actions () {

     ctrx_connect_server("ludens", "test", "test", "ludens", CTRX_LAST);
     ctrx_wait_for_event("LOGON", CTRX_LAST);

     /* Launch the web browser by clicking on desktop IE icon */
     ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, NULL, CTRX_LAST);
     lr_think_time(13);
     ctrx_set_window("Welcome to MSN.com - Microsoft Internet Explorer", CTRX_LAST);

     /* Exit the web browser by clicking on top left Exit check box */
     ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
               "Welcome to MSN.com - Microsoft Internet Explorer", CTRX_LAST);
     lr_think_time(12);
     ctrx_disconnect_server("ludens", CTRX_LAST);

     return 0;
}

In the following example, after connecting to the server ludens and opening Microsoft's Internet Explorer application, the function ctrx_disconnect_server disconnects from the server.

Actions () {

     ctrx_connect_server("ludens", "test", "test", "ludens", CTRX_LAST);
     ctrx_wait_for_event("LOGON", CTRX_LAST);

     /* Launch the web browser by clicking on desktop IE icon */
     ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, NULL, CTRX_LAST );
     lr_think_time(13);
     ctrx_set_window("Welcome to MSN.com - Microsoft Internet Explorer", CTRX_LAST);

     /* Exit the web browser by clicking on top left Exit check box */
     ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
               "Welcome to MSN.com - Microsoft Internet Explorer", CTRX_LAST);
     lr_think_time(12);
     ctrx_disconnect_server("ludens", CTRX_LAST);

     return 0;
}