You are here: SwitchKit® Development Environment Programmer’s Guide > 2 Connection Management > Connecting Legacy Applications to Multiple LLCs
Connecting Legacy Applications to Multiple LLCs
Description
Do not use this model if you intend to write a new application. This model is only to be used by existing appliactions, written to run on SwitchKit versions before 5.7.
Functions in this category rely heavily on the SK_Connection pointer to determine or provide information and context. SK_Connection is returned when the connection to the LLC is first established. If your application must make a request to the LLC or needs to receive a message, if would first have to send function calls to get or set the current connection to the specific SK_Connection pointer.
How to use the Connection Model without ID
To connect to multiple LLCs and to manage those connections, your application must call SK_Connection *sk_createConnection(). Every call creates a separate SK_Connection pointer for each connection. To send a message to a specific LLC, your application must call the function sk_setCurrentConnection() with the SK_Connection pointer at the desired LLC. Without that function call and specifying pointer, there is no way to direct a message to an LLC other than the one for which SwitchKit is processing the current message.
Functions in this Model
SK_Connection *sk_createConnection();
int sk_getLLCSocketDescriptor();
int sk_getSpecificConnectionName();
const char *sk_getSpecificConnectionLabel();
SK_Connection *sk_getCurrentConnection();
void sk_setCurrentConnection();
int sk_destroyConnection();
int sk_appDescriptionData();