vtc_connect

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

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

Parameterization

All string input arguments can be passed using standard parameterization.

C Language Example

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

PVCI2 pvci = 0;

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

C# Language Example

.Net Multiple Connection Example