Todor Buyukliev 29.Oct.04 08:38 AM a Web browser Deverloper Toolkits 6.5.1 Windows NT/2000
Has anyone tried to create multiple ST clients in the same application? Is this allowed by the C++ toolkit at all?
Here is the situation I observe:
I've got a multithreaded MFC program. I'm linking with starchmfc.lib. I've got several threads whose only job is to run a message loop (each thread has its own message loop). This message loop allows me to receive events from Sametime and to tell the threads to invoke some functions I defined for initializing and logging in a ST client for example. So everything I do with the API is done within the context of the message looping threads.
In each thread I create a STSession, start it, create a CommunityService and add a MyLoginListener to it. So there are many sessions and many listeners. Everything is fine so far.
But when I start loggin in the clients a very strange thing happens: every event is fired to every LoginListener!!! This means that if I have 10 clients and one of them logs in, the login event is fired to the other 9 too. When the second client logs in, both loggedIn and loggedOut events are fired (I presume this logs out the first client) and so on...
I tried to register a LoginListener only in the first client's CommunityService. Now he's the only one to receive events, but he receives events from all the other clients too. Again loggedIn and loggedOut events are fired.
To avoid some possible questions here: yes - each STSession has a unique name, and yes - the clients are logging to different accounts, and yes - I'm registering different LoginListeners to the different CommunityServices.
Every information on this topic is highly appreciated! I want to know whether what I'm trying to do is possible in theory and how. Thanks in advance!