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
- WSLinkWaitCallBackObject is used with WSWaitForLinkActivityWithCallback().
- A function used as a WSLinkWaitCallBackObject should return 1 to indicate WSWaitForLinkActivityWithCallback() should return.
- WSLinkWaitCallBackObject is defined in the WSTP header file wstp.h.
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 */
}
}