You are here: SwitchKit® Development Environment Programmer’s Guide > 2 Connection Management > Applications Connecting to Multiple LLCs

Applications Connecting to Multiple LLCs

Description

This model is for an SwitchKit environment with multiple LLCs. Use this model if you are writing a new application that must connect to multiple LLCs.

In this model, your application specifies the connection information in the create connection function call and assigns a connection ID and an application name to that connection. From then on, all references to the connection are made using the connection ID. This eliminates any ambiguity about the LLC connection. The connection ID is returned with each event, which makes it simple to determine which LLC should receive subsequent action.

How to use the Connection Model with ID

To connect to multiple LLCs and to manage those connections, your application must call SK_Connection *sk_createConnectionWithID(). With that function call, an integer connection ID is assigned to the connection between the application and that particular LLC.

When the connection ID is assigned, your application must call one of the sk_*OnConnection() functions to interact with a particular LLC. The sk_*OnConnection() function takes the assigned connection ID as a parameter.

Functions in this Model

Following is a list of functions that are to be used in this model:

SK_Connection *sk_createConnectionWithID();

sk_*OnConnection();

int sk_closeNamedConnection();

int sk_getLLCSocketDescriptorForConnection();

int sk_getConnectionNameForConnection();

int sk_getConnectionForID;

int sk_destroyConnectionForced();

int sk_appDescriptionData();

SK_Connection*

SK_Connection is an opaque object which is returned by several sk_createConnection*() functions that can be used to refer to a specific connection in other SwitchKit connection management functions such as sk_getSpecificConnectionName().

In PPL, a condition that, when met, drives a state machine (PPL Component) from one state to another, by invoking an associated Primitive. In PPL files, an Event is marked by an arrow and text.