[Freeswitch-users] mod_managed - beginner's question about an event listener module
Dave R. Kompel
drk at drkngs.net
Sat Sep 21 05:56:40 MSD 2013
To answer all your questions at once...
put the EventConsumer inside a using() block, so it gets disposed.
use a static boolean variable in a while loop to .pop the event consumer with a timeout, if pop returns null "continue" the while loop.
Subscribe to shutdown, it sets the loop variable to false.
API command "shutdown" in the same module to set the variable to false also, so you can unload your module at will w/o crashing
This whole loop shoud be run on it's own thread started from the Load() method.
--Dave
_____
From: Rafal Gwizdala [mailto:rafal.gwizdala at gmail.com]
To: FreeSWITCH Users Help [mailto:freeswitch-users at lists.freeswitch.org]
Sent: Fri, 20 Sep 2013 04:08:58 -0700
Subject: Re: [Freeswitch-users] mod_managed - beginner's question about an event listener module
(...)
my source code: http://pastebin.com/bKPyKSwS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130920/e8464bbe/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list