WSLinkWaitCallBackObject (C Function)

is a WSTP type representing a function pointer with the following declaration: int function(WSLINK l, void *u), where l is a WSTP connection and u is reserved for future use.

Details

Examples

Basic Examples  (1)

#include "wstp.h"

int WaitFunction(WSLINK l, void *unused)
{
    return 0;
}

void f(WSLINK l)
{
    switch(WSWaitForLinkActivityWithCallback(l, (WSLinkWaitCallBackObject)WaitFunction))
    {
        catch WSWAITERROR:
            /* handle the error. */
            break;
        catch WSWAITSUCCESS:
            /* Read the data off the link */
            break;
        catch WSWAITCALLBACKABORTED:
        default:
            /* wait was aborted */
    }
}