You are here: SwitchKit® Development Environment Programmer’s Guide > 2 Connection Management > Additional Functions for Legacy Applications

Additional Functions for Legacy Applications

sk_getSpecificConnectionName()

With the function sk_getSpecificConnectionName() your application can retrieve the numeric name of that connection. This function does not change the current connection.

Syntax

int sk_getSpecificConnectionName(SK_Connection *aConnection);

Threadsafe Syntax

int sk_getSpecificConnectionName(int aConID);

sk_getSpecificConnectionID()

With the function sk_getSpecificConnectionID() your application can retrieve the connection ID of that connection. This function does not change the current connection.

Syntax

int sk_getSpecificConnectionID(SK_Connection *aConnection);

sk_getSpecificConnectionLabel()

The function sk_getSpecificConnectionLable() returns the label associated with a connection that was created with sk_createConnection().

Syntax

int sk_getSpecificConnectionLabel(SK_Connection *aConnection);

sk_getCurrentConnection()

If your application is connected to more than one LLC, the LLC receiving a message or function call makes that connection current. Unless otherwise specified, the LLC communicates with your application through that current connection.

The function SK_Connection *sk_getCurrentConnection() enables another process of your application to get the current connection.

Syntax

int SK_Connection *sk_getCurrentConnection();

sk_setCurrentConnection()

Your application should issue the function call sk_setCurrentConnection() to make that connection current. Any future communication goes through that connection

Syntax

int sk_setCurrentConnection(SK_connection *aConnection);

sk_destroyConnection()

Your application should use the function sk_destroyConnection() to destroy a connection to the LLC. You cannot use this function on your current connection. Therefore, this function can destroy all connections between applications and the LLC, except the last connection left. This function call frees up all the memory allocated in sk_createConnection().

Syntax

int sk_destroyConnection(SK_Connection *aConnection);

Threadsafe Syntax

int skts_destroyConnection( int aConID );

Return Values

SK_CONNECT_IN_USE | This return value indicates that you called the function on the current connection.