API Guide
601355 Rev A API Functions 2-345
Functions
47
48 printf(“Number of Timeouts to process
==> “ );
49 timeout = atoi(gets(input));
50
51 printf(“\nlistening\n” );
52
53 /* create the notify handle */
54 if ( (h = VS_Notify_Create()) !=
(VST_NOTIFY_HANDLE) NULL )
55 {
56 /* initialize the notify handle */
57 VS_Notify_SetFields ( h,
58 VSID_PROTOCOL, VSE_PROT_TCP,
59 VSID_PROGRAM_NUMBER,
prognum,
60 VSID_VERSION_NUMBER,
versnum,
61 VSID_PROCEDURE_NUMBER,
procnum,
62 VSID_CLIENT_DISPATCH,
vst_notify_dispatch,
63 VSID_TIMEOUT_VALUE, t,
64 VSID_ENDFIELD );
65
66 done = VSE_FALSE;
67 while ( ! done )
68 {
69 /* “listen” for callbacks and
act on the */
70 /* error code */
71 switch ( (i = VS_Notify_Listen(
h )) )
72 {
73 case VSE_ERR_TIMEOUT:
74 printf(“Timed out\n” );
75 timeout--;
76 break;
77 case VSE_ERR_NONE:
78 /* This is the successful
case. */