ons 2004-02-25 klockan 16.17 skrev Cai, Xuejun: > Hi, Hi,
Sorry for late reply, spent most of last week in bed with a terrible cold. > In our application we need open multiple connections concurrently in one > thread or multiple threads, can I achieve that and how can? I have a > look on the source code of loudmouth, each connection's context is set > to the default context, so I think it may be impossbile to open a new > connection in other threads except the main thread. Any comments or hints? I think to use it from one thread you should just have to create several LmConnections. It doesn't matter that they are all driven by the default context. To use one context per thread we would have to add the possibility to let Loudmouth know what context to use, this can be done by: lm_connection_new_with_context (); or add an option context argument to lm_connection_new (passing NULL would give the default context). Not sure which one is the better, I think I'd want to go with the first since it won't break the API and won't be in the way for people who want to use the default context. What do you think? Best Regards, Mikael Hallendal -- Mikael Hallendal [email protected] Imendio HB http://www.imendio.com Phone: +46 (0)709 718 918
