27 Mar
2009
27 Mar
'09
5:43 p.m.
con = freeswitch.EventConsumer("all");
now you have a consumer obj
every time you call con:pop() with no arg you will either get an event or nil when there are no events to consume. every time you call con:pop(1) the consumer object will block until there is an event.
So you use the first way in conjunction with some other lock to do async or the 2nd way you do a dedicated blocking loop.
FYI, I added this information to the wiki page for freeswitch.EventConsumer. -MC