You are here: SwitchKit Programmer’s Guide > 7 Message Functions > sk_sendMessage()
Description
The sk_sendMessage() function takes the results of sk_packMessage() and sends a character buffer with a size to the switch. If no appropriate message structure is available to pass to sk_packMessage(), the character buffer can be filled in manually. This message is also available as sk_sendMessageOnConnection() and skts_sendMessage().
int sk_sendMessage(char *aBuffer, aBufSize);
int sk_sendMessageOnConnection(char *aBuffer, aBufSize,
int aConID);
The function parameters are shown in the table below
Argument |
Description |
---|---|
aBuffer |
Pointer to a packed message. |
aBufSize |
Size of the packed message. |
aTag |
An application defined pointer which will be returned to the application when a handler is invoked. |
aHandlerFunc |
A pointer to a function that is designed to handle messages. |
aConID |
aConID is a connection identifier specified at connection creation time and used to indicate which LLC an application wishes to communicate with. |
Possible return values for this function:
SK_LOST_LLC |
This return value indicates that your application lost contact with the LLC. |
SK_UNKNOWN_MSG_ |
Buffer and Size pointers do not point to a valid message. |
SK_NO_CONNECT_ |
The specified connection from OnConnection() is not available or valid. |