ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.165 by root, Tue Jul 8 23:07:26 2008 UTC vs.
Revision 1.166 by root, Tue Jul 8 23:10:20 2008 UTC

152=head2 I/O WATCHERS 152=head2 I/O WATCHERS
153 153
154You can create an I/O watcher by calling the C<< AnyEvent->io >> method 154You can create an I/O watcher by calling the C<< AnyEvent->io >> method
155with the following mandatory key-value pairs as arguments: 155with the following mandatory key-value pairs as arguments:
156 156
157C<fh> the Perl I<file handle> (I<not> file descriptor) to watch 157C<fh> the Perl I<file handle> (I<not> file descriptor) to watch for events
158for events. C<poll> must be a string that is either C<r> or C<w>, 158(AnyEvent might or might not keep a reference to this file handle). C<poll>
159which creates a watcher waiting for "r"eadable or "w"ritable events, 159must be a string that is either C<r> or C<w>, which creates a watcher
160respectively. C<cb> is the callback to invoke each time the file handle 160waiting for "r"eadable or "w"ritable events, respectively. C<cb> is the
161becomes ready. 161callback to invoke each time the file handle becomes ready.
162 162
163Although the callback might get passed parameters, their value and 163Although the callback might get passed parameters, their value and
164presence is undefined and you cannot rely on them. Portable AnyEvent 164presence is undefined and you cannot rely on them. Portable AnyEvent
165callbacks cannot use arguments passed to I/O watcher callbacks. 165callbacks cannot use arguments passed to I/O watcher callbacks.
166 166

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines