Share this page

# lrvtc.connect

Generates a connection descriptor.

Global Functions

## Syntax

    lrvtc.connect ( serverName, portNumber, options );

## Arguments

name | Comments
--- | ---
serverName | The name or IP address of the VTS server host.
portNumber | The port the server is listening on.
options | One of: 0 - No options lrvtc.VTOPT_KEEP_ALIVE - Keep connection alive

The lrvtc.connect function creates a connection to the server.

If a connection already exists, it is automatically disconnected and cleared.

## Return Values

Returns zero on success or one of the Error Codes.

## Parameterization

All string input arguments can be passed using standard parameterization.

## Example

    var   VtsServer = "myVTSserver";
    var   nPort = 8888;
    var   rc;

    vuser_init()
    {
        rc = lrvtc.connect(VtsServer,nPort,lrvtc.VTOPT_KEEP_ALIVE);
        lr.logMessage("Connect result rc="+ rc);
        return 0;
    }

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: