lrvtc.connect

Generates a connection descriptor.

ExampleGlobal Functions

Syntax

lrvtc.connect ( serverName, portNumber, options );

Arguments

nameComments
serverName The name or IP address of the VTS server host.
portNumberThe 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;
}