Deprecated. Use lrvtc_connect. Generates a connection descriptor.

C Language

PVCI2 vtc_connect ( char *servername, int portnumber, int options );

C# Language

long vts_multi.connect ( const string servername, int portnumber, LoadRunner.ConnectionOptions options );
Global Functions


servername The name or IP address of the VTS server host.
portnumberThe port the server is listening on.

One of:

  • 0 - No options
  • VTOPT_KEEP_ALIVE - Keep connection alive (C language)
  • LoadRunner.ConnectionOptions.KeepAlive - Keep connection alive (C# language)
  • Constants.VTOPT_KEEP_ALIVE - Keep connection alive (Java language)

The vtc_connect function creates a connection to the server.

Return Values

A connection descriptor. The descriptor is passed to other functions as the pvci argument.


All string input arguments can be passed using standard parameterization.

C Language Example

char  *VtsServer = "myVTSserver";
int   nPort = 8888;

PVCI2 pvci = 0;

    pvci = vtc_connect(VtsServer,nPort,VTOPT_KEEP_ALIVE);
    lr_log_message("pvci=%d\n", pvci);
    return 0;

C# Language Example

.Net Multiple Connection Example