|
NAMEEvent::RPC::Loop - Mainloop Abstraction layer for Event::RPCSYNOPSISuse Event::RPC::Server; use Event::RPC::Loop::Glib; my $server = Event::RPC::Server->new ( ... loop => Event::RPC::Loop::Glib->new(), ... ); $server->start; DESCRIPTIONThis modules defines the interface of Event::RPC's mainloop abstraction layer. It's a virtual class all mainloop modules should inherit from.INTERFACEThe following methods need to be implemented:
A watcher object is returned. What this exactly is depends on the implementation, so you can't do anything useful with it besides passing it back to del_io_watcher().
A timer object is returned. What this exactly is depends on the implementation, so you can't do anything useful with it besides passing it back to del_io_timer().
DIRECT USAGE IN YOUR SERVERYou may use the methods of Event::RPC::Loop by yourself if you like. This way your program keeps independent of the actual mainloop module in use, if the simplified interface of Event::RPC::Loop is sufficient for you.In your server program you access the actual mainloop object this way: my $loop = Event::RPC::Server->instance->get_loop; Naturally nothing speaks against making your program to work only with a specific mainloop implementation, if you need its features. In that case you may use the corresponding API directly (e.g. of Event or Glib), no need to access it through Event::RPC::Loop. AUTHORSJörn Reder <joern at zyn dot de> COPYRIGHT AND LICENSECopyright (C) 2002-2006 by Joern Reder, All Rights Reserved.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. POD ERRORSHey! The above document had some coding errors, which are explained below:
Visit the GSP FreeBSD Man Page Interface. |