You are here: SwitchKit® Development Environment Programmer’s Guide > 2 Connection Management > sk_createConnectionWithID()

sk_createConnectionWithID()

Description

Use the SK_Connection *sk_createConnectionWithID() function to create a connection between your application module and a specific LLC.

Syntax

SK_Connection *sk_createConnectionWithID(int aConID, const char *aLabel, int anAppID, int isForcedFlag, const char *aPriHost, int aPriPort, const char aBackupHost, int aBackupPort);

Parameters

The function parameters are shown in the table below.

Argument | Description
--- | ---
aConID | The user-defined unique connection ID to a particular LLC.
aLabel | A user-defined text string to identify the connection, but it has no meaning to the connection management code.
anAppID | anAppID is the application identifier used by the LLC to route messages to the application and to log any events of interest regarding the application. If the caller of the function does not care which application identifier it receives, it can specify -1. This allows LLC to select the next available application identifier beginning at 10. If the specified application identifier is already used, the LLC will assign the next available identifier beginning at the requested identifier, unless the isForcedFlag is set to 1 or sk_initializeConnectionForced() was used to establish the connection with LLC.
isForcedFlag | If isForcedFlag equals 1, then the application identifier for this application will be set to the value specified in anAppID even if that application identifier is being used by another application.
aPriHost | The IP address of the primary LLC with the following format, for example: "10.10.55.10"
aPriPort | The IP port number the primary LLC the primary LLC is listening to.
aBackupHost | The IP address of the secondary LLC, in the following format, for example: "10.10.55.10". If there is no secondary LLC, this field should be set to "". That is, the 0-length string.
aBackup Port | The IP port for the secondary LLC is listening to.

Return Values

This is one of the functions, that returns an integer value pointer of an integer. A NULL pointer indicates an error condition.

Useful Related Functions

sk_*OnConnection();

int sk_closeNamedConnection();

int sk_getLLCSocketDescriptorForConnection();

int sk_getConnectionNameForConnection();

int sk_getConnectionForID;

int sk_destroyConnectionForced();

int sk_appDescriptionData();

Internet Protocol. Part of the TCP/IP family of protocols used to route messages and tracks the addresses of nodes.
The point in the Excel platform where a DS0 connects to a network. Also known as a "socket."