OpenersNotesSection(Spacer1)Details

WSLinkWaitCallBackObject is used with (NonWLLink[WSWaitForLinkActivityWithCallback(), paclet:ref/c/WSWaitForLinkActivityWithCallback]).

A function used as a WSLinkWaitCallBackObject should return 1 to indicate (NonWLLink[WSWaitForLinkActivityWithCallback(), paclet:ref/c/WSWaitForLinkActivityWithCallback]) should return.

WSLinkWaitCallBackObject is defined in the WSTP header file (RefLink[wstp.h, paclet:ref/file/wstp.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)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 */
	}
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[WSWaitForLinkActivityWithCallback(), paclet:ref/c/WSWaitForLinkActivityWithCallback])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[WSTP C API Developer Guide (Mac OS X), paclet:tutorial/WSTPDeveloperGuide-MacintoshOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Unix and Linux), paclet:tutorial/WSTPDeveloperGuide-UnixOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Windows), paclet:tutorial/WSTPDeveloperGuide-WindowsOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Alphabetical Listing of WSTP C Functions, paclet:guide/AlphabeticalListingOfWSTPCFunctions])}})}})