[pjsip] Broadcast Instant Message to all Buddies in list

Benny Prijono bennylp at pjsip.org
Thu Feb 14 11:41:15 EST 2008

On 2/13/08, Thomas Plotkowiak <plotti at gmx.net> wrote:
> I see that psjua has an option to broadcast an instant message to all
> buddies in list, yet it seems somehow not to be implemented in the example
> application.
> Is there any good way to broadcast a message?
> The only one I see now is to:
>  1.To pjsua_enum_buddies
> 2.Then get pjsua_buddy_get_info for all of them
> 3.And use pjsua_im_send to all of them
> It seems somehow to be a quite resource consuming way, since I am planing to
> do this a couple of times a second...

It shouldn't be too time consuming IMO, and if IM broadcast was
implemented in the library, that's probably how the library will do it
anyway, so you have little to lost in implementing it in the

> Should I maybe keep track of all my buddies in a separate vector containing
> all buddies with their uri and their status, to not enum them over and over
> again? Does anybody have an idea for this?

You can do that, but probably you'll only save yourself a couple of
microseconds, so probably it's not worth managing the complexities.


> Cheers
> Thomas
> _______________________________________________
>  Visit our blog: http://blog.pjsip.org
>  pjsip mailing list
>  pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

More information about the pjsip mailing list