summaryrefslogtreecommitdiffstats
path: root/xpa/doc/pod/xpapoll.pod
blob: 1f26ee1506a6763fda745dd22c4b884408644742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
=pod

=head1 NAME



B<XPAPoll: execute existing XPA requests>



=head1 SYNOPSIS





  #include <xpa.h>

  int XPAPoll(int msec, int maxreq);





=head1 DESCRIPTION




It is sometimes desirable to implement a polling loop, i.e., where one
checks for and processes XPA requests without blocking.  For this
situation, use the XPAPoll() routine:

  XPAPoll(int msec, int maxreq);


The XPAPoll() routine will perform XPAAddSelect() and select(), but with a
timeout specified in millisecs by the msec argument. If one or more
XPA requests are made before the timeout expires, the XPAProcessSelect()
routine is called to process those requests. The maxreq value determines
how many requests will be processed: if maxreq < 0, then no events are
processed, but instead, the return value indicates the number of events
that are pending.  If maxreq == 0, then all currently pending requests
will be processed.  Otherwise, up to maxreq requests will be processed.
(The most usual values for maxreq are 0 to process all requests and 1
to process one request).




=head1 SEE ALSO



See xpa(n) for a list of XPA help pages


=cut