How getLLCSocketDescriptor works

By calling sk_getLLCSocketDescriptorForConnection() your application retrieves the socket descriptor associated with the specified connection ID from the LLC. This enables your application to issue an OS-specific call, for example select(). This indicates when there is activity on the LLC socket and then the application must call the function sk_rcvAndDispatch() to begin processing of all messages on the LLC socket.

The sk_getLLCSocketDescriptorForConnection() function should be called each time select() is called, because the socket descriptor can change without the application being aware of it.

For example, if the PLLC fails and the RLLC becomes active, the socket of the PLLC will no longer be valid. A subsequent call to the function provides the socket descriptor for the now active RLLC.

sk_getConnectionForID()

The function call sk_getConnectionForID() retrieves the SK_Connection object for the specified connection ID.

Syntax

SK_Connection *sk_getConnectionForID(int aConID);

sk_destroyConnection
Forced()

Your application should use the function sk_destroyConnectionForced() to destroy a connection to the LLC with the specified connection ID. If the specified connection is the last connection opened, it will be destroyed but cause a return value SK_NO_CONNECT_AVAIL. As the name implies, this return indicates that no connections remain. However, should your application call sk_rcvAndDispatch(), the system attempts to establish a connection to an LLC using the default connection arguments specified in the SK_LLC_Host/Port environment variables, or at local host:1312.

This function call frees up all the memory allocated in sk_createConnectionWithID().

Syntax

int sk_destroyConnectionForced(int aConID);

Threadsafe Syntax

int skts_destroyConnectionForced(int aConID);

Return Values

SK_NO_CONNECT_AVAIL

This return indicates that all connections have been destroyed.