Hi all,

This week was mostly occupied by the event hooks at package level. To
register events at package level I have made the following draft:


   - When *_mkp_event_write()* is called, call
*duda_package_event_write()*and check its return type, if the event is
handled at the package level
   then return the *PLUGIN_OWNED* return value, else continue with the
   handling at the plugin level.
   - Inside *duda_package_event_write()* call *duda_package_event_get()* to
   get *struct package_event* corresponding to the *socketid*. The
   package_event structure will contain a handler of the type *duda_package*.
   If the *event_write* hook for the corresponding package is defined then
   call the corresponding hook otherwise continue with the normal plugin event
   handling.
   - Inside *duda_package_event_get()* a list of *package_event* is
   retrieved using the *mk_list* stored in the *pthread_key_t
   duda_plugin_event_k*.
   - To add/del events to epoll, event_add and event_del hooks are to be
   made at duda'a level where the events will be added to the mk_list stored
   in the pthread key and then *mk_plugin_event_add* will be called.

I have completed the first 3 points of coding but stuck at the 4th one for
the need of a package_event structure at the call of event_add. edsiper is
looking into it and hopefully with this being done the redis implementation
will be over.

Blog link: http://mygsocblog.wordpress.com/2012/06/10/week-3/
Github repo link: https://github.com/sourabh0612/monkey/tree/gsoc/

PS: All the existing datatypes and methods are italicized and the new ones
are in bold.



-- 
Sourabh Chandak
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to