… | |
… | |
70 | You can create I/O watcher by calling the C<< AnyEvent->io >> method with |
70 | You can create I/O watcher by calling the C<< AnyEvent->io >> method with |
71 | the following mandatory arguments: |
71 | the following mandatory arguments: |
72 | |
72 | |
73 | C<fh> the Perl I<filehandle> (not filedescriptor) to watch for |
73 | C<fh> the Perl I<filehandle> (not filedescriptor) to watch for |
74 | events. C<poll> must be a string that is either C<r> or C<w>, that creates |
74 | events. C<poll> must be a string that is either C<r> or C<w>, that creates |
75 | a watcher waiting for "r"eadable or "w"ritable events. C<cb> teh callback |
75 | a watcher waiting for "r"eadable or "w"ritable events. C<cb> the callback |
76 | to invoke everytime the filehandle becomes ready. |
76 | to invoke everytime the filehandle becomes ready. |
77 | |
77 | |
78 | Only one io watcher per C<fh> and C<poll> combination is allowed (i.e. on |
78 | Only one io watcher per C<fh> and C<poll> combination is allowed (i.e. on |
79 | a socket you can have one r + one w, not any more (limitation comes from |
79 | a socket you can have one r + one w, not any more (limitation comes from |
80 | Tk - if you are sure you are not using Tk this limitation is gone). |
80 | Tk - if you are sure you are not using Tk this limitation is gone). |
… | |
… | |
252 | no warnings; |
252 | no warnings; |
253 | use strict; |
253 | use strict; |
254 | |
254 | |
255 | use Carp; |
255 | use Carp; |
256 | |
256 | |
257 | our $VERSION = '2.55'; |
257 | our $VERSION = '2.6'; |
258 | our $MODEL; |
258 | our $MODEL; |
259 | |
259 | |
260 | our $AUTOLOAD; |
260 | our $AUTOLOAD; |
261 | our @ISA; |
261 | our @ISA; |
262 | |
262 | |
… | |
… | |
305 | last; |
305 | last; |
306 | } |
306 | } |
307 | } |
307 | } |
308 | |
308 | |
309 | $MODEL |
309 | $MODEL |
310 | or die "No event module selected for AnyEvent and autodetect failed. Install any one of these modules: Event (or Coro+Event), Glib or Tk."; |
310 | or die "No event module selected for AnyEvent and autodetect failed. Install any one of these modules: EV (or Coro+EV), Event (or Coro+Event), Glib or Tk."; |
311 | } |
311 | } |
312 | |
312 | |
313 | unshift @ISA, $MODEL; |
313 | unshift @ISA, $MODEL; |
314 | push @{"$MODEL\::ISA"}, "AnyEvent::Base"; |
314 | push @{"$MODEL\::ISA"}, "AnyEvent::Base"; |
315 | } |
315 | } |