Install Perl 5.8.8
[msysgit.git] / mingw / html / ext / IO / lib / IO / Poll.html
blobfcf0c672ee0d9d1eb33fa70e4bd9e7d50ae32b7d
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>IO::Poll - Object interface to system poll call</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;IO::Poll - Object interface to system poll call</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <li><a href="#methods">METHODS</a></li>
26 <li><a href="#see_also">SEE ALSO</a></li>
27 <li><a href="#author">AUTHOR</a></li>
28 <li><a href="#copyright">COPYRIGHT</a></li>
29 </ul>
30 <!-- INDEX END -->
32 <hr />
33 <p>
34 </p>
35 <h1><a name="name">NAME</a></h1>
36 <p>IO::Poll - Object interface to system poll call</p>
37 <p>
38 </p>
39 <hr />
40 <h1><a name="synopsis">SYNOPSIS</a></h1>
41 <pre>
42 use IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP);</pre>
43 <pre>
44 $poll = new IO::Poll;</pre>
45 <pre>
46 $poll-&gt;mask($input_handle =&gt; POLLIN);
47 $poll-&gt;mask($output_handle =&gt; POLLOUT);</pre>
48 <pre>
49 $poll-&gt;poll($timeout);</pre>
50 <pre>
51 $ev = $poll-&gt;events($input);</pre>
52 <p>
53 </p>
54 <hr />
55 <h1><a name="description">DESCRIPTION</a></h1>
56 <p><code>IO::Poll</code> is a simple interface to the system level poll routine.</p>
57 <p>
58 </p>
59 <hr />
60 <h1><a name="methods">METHODS</a></h1>
61 <dl>
62 <dt><strong><a name="item_mask">mask ( IO [, EVENT_MASK ] )</a></strong>
64 <dd>
65 <p>If EVENT_MASK is given, then, if EVENT_MASK is non-zero, IO is added to the
66 list of file descriptors and the next call to poll will check for
67 any event specified in EVENT_MASK. If EVENT_MASK is zero then IO will be
68 removed from the list of file descriptors.</p>
69 </dd>
70 <dd>
71 <p>If EVENT_MASK is not given then the return value will be the current
72 event mask value for IO.</p>
73 </dd>
74 </li>
75 <dt><strong><a name="item_poll">poll ( [ TIMEOUT ] )</a></strong>
77 <dd>
78 <p>Call the system level poll routine. If TIMEOUT is not specified then the
79 call will block. Returns the number of handles which had events
80 happen, or -1 on error.</p>
81 </dd>
82 </li>
83 <dt><strong><a name="item_events">events ( IO )</a></strong>
85 <dd>
86 <p>Returns the event mask which represents the events that happened on IO
87 during the last call to <a href="#item_poll"><code>poll</code></a>.</p>
88 </dd>
89 </li>
90 <dt><strong><a name="item_remove">remove ( IO )</a></strong>
92 <dd>
93 <p>Remove IO from the list of file descriptors for the next poll.</p>
94 </dd>
95 </li>
96 <dt><strong><a name="item_handles">handles( [ EVENT_MASK ] )</a></strong>
98 <dd>
99 <p>Returns a list of handles. If EVENT_MASK is not given then a list of all
100 handles known will be returned. If EVENT_MASK is given then a list
101 of handles will be returned which had one of the events specified by
102 EVENT_MASK happen during the last call ti <a href="#item_poll"><code>poll</code></a></p>
103 </dd>
104 </li>
105 </dl>
107 </p>
108 <hr />
109 <h1><a name="see_also">SEE ALSO</a></h1>
110 <p><a href="#item_poll">poll(2)</a>, <a href="file://C|\msysgit\mingw\html/lib/IO/Handle.html">the IO::Handle manpage</a>, <a href="file://C|\msysgit\mingw\html/lib/IO/Select.html">the IO::Select manpage</a></p>
112 </p>
113 <hr />
114 <h1><a name="author">AUTHOR</a></h1>
115 <p>Graham Barr. Currently maintained by the Perl Porters. Please report all
116 bugs to &lt;<a href="mailto:perl5-porters@perl.org">perl5-porters@perl.org</a>&gt;.</p>
118 </p>
119 <hr />
120 <h1><a name="copyright">COPYRIGHT</a></h1>
121 <p>Copyright (c) 1997-8 Graham Barr &lt;<a href="mailto:gbarr@pobox.com">gbarr@pobox.com</a>&gt;. All rights reserved.
122 This program is free software; you can redistribute it and/or
123 modify it under the same terms as Perl itself.</p>
124 <table border="0" width="100%" cellspacing="0" cellpadding="3">
125 <tr><td class="block" style="background-color: #cccccc" valign="middle">
126 <big><strong><span class="block">&nbsp;IO::Poll - Object interface to system poll call</span></strong></big>
127 </td></tr>
128 </table>
130 </body>
132 </html>