Hi,

I've been looking at how Qpid Proton (C++) might integrate more closely
with reSIProcate applications.  Is there a way to give the container
some cycles from an existing event loop and then the container lets the
thread do other things?

At present I run the container in a separate thread.

Many reSIProcate applications have a loop like this[1] at the
application level, I've commented it:

   while ( !clientHandler.done )
   {
      // SipStack::process( millisecs )
      // calls select on all the transports, also handles timers
      // at the stack level
      stack.process(100);

      // DialogUsageManager::process()
      // This does the higher level processing of any messages that
      // came into the SipStack over any transport
      while(clientDum.process());


      // here we could call other things that need to run in
      // this thread



      // demo only loops so many times...
      if (n == 1000) clientHandler.done = true;
      if (!(n++ % 10)) cerr << "|/-\\"[(n/10)%4] << '\b';
   }
   return 0;


I've also done a few things with asio[2], I would also be interested in
any examples of how to use Qpid Proton with asio without having separate
threads.

Regards,

Daniel


1.
https://github.com/resiprocate/resiprocate/blob/master/resip/dum/test/basicRegister.cxx#L125
2. http://think-async.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to