ihuServerRegisterCallbacks

Use the ihuServerRegisterCallbacks function if you want your program to be notified of changes in buffering or connection state. For example, your program can be notified of connection loss or that buffering is full.

Prototype

ihuErrorCode IHUAPI ihuServerRegisterCallbacks (
long hServer,
void *UserParameter,
long *RegisterCallbacksStatus,
void *BufferCallbackFunction,
void *ConnectionCallbackFunction
); 

Remarks

The inputs to this function are:

  • hServer: Server handle from the connection. Callbacks are as per server handle, so you can have callbacks for some connections and not for others, or specific callbacks for different handles.
  • UserParameter: NULL or an integer value that you want passed to you in the callback.
  • RegisterCallbacksStatus: Callback setup success or failure.
  • BufferCallbackFunction: Callback function for buffer state changes.
  • ConnectionCallbackFunction: Callback function for connection state changes.

Returns

ihuServerRegisterCallbacks returns the following values:

  • ihuSTATUS_OK
  • ihuSTATUS_FAILED