[ejabberd] why is mod_offline.handle_info implemented?

Gaurav Jain monkeyfdude at gmail.com
Sun Mar 1 19:29:04 MSK 2015


Thank you so much for the answer. I did read all the books but I think I
just need to struggle a little bit to understand it better.

My confusion is/was:

* Under which circumstances the* gen_server:callback:handle_info* will be
triggered (*Use case*)

I wrote a custom module based on (*offlline_message_hook*)

https://www.process-one.net/en/wiki/ejabberd_events_and_hooks/

which does *NOT* require us to implement *gen_server*:*handle_info*


But *mod_offline.erl* has implemented this. So what is the use case and
would that use case *will apply to me* is what I was/am trying to figure
out.


Best Regards,




On Sun, Mar 1, 2015 at 5:13 AM, Holger Weiß <holger at zedat.fu-berlin.de>
wrote:

> * Gaurav Jain <monkeyfdude at gmail.com> [2015-02-28 08:06]:
> > But I notice that in mod_offline.erl, handle_info is implemented as well.
> >
> > * Would you be able to tell why is hadle_info implemented in
> >   mod_offline.erl?
> > * How will this be called?
> > * And under which situtations?
>
> That's a gen_server callback, see the OTP documentation or any good book
> on Erlang/OTP, e.g.:
>
>   http://www.erlang.org/doc/man/gen_server.html
>   http://www.erlang.org/doc/design_principles/gen_server_concepts.html
>   http://learnyousomeerlang.com/clients-and-servers
>
> Holger
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20150301/7f036532/attachment.html>


More information about the ejabberd mailing list