at the moment I’m writing a MultiUserChat with the help of the smack api. Like you know the smack documentation also gives some examples about how to create a connection. But what is the solution if I want to create many connections to my openfire server?
The users should be able to connect to a multi user chat room. So I have a class connection. If a user tries to login a new instance of my class connection will be created. So far so good. But if a new user is coming, the object gets overridden. (privat Connection con;)
So the problem is that always just one user is connected to the server.
What is the best solution to manage many conections to my xmpp server?
…I was thinking about an ArrayList. Would that be the best to handle all the connections?
The next question would be… I want to create a new connection to the server if the user is not already logged in. How can I check if the user is not in logged in or in the room?
Maybe I have a fault in my line of thought?!
I didn’t find a lot on the internet about managing the connections to an xmpp server, hope you can help me. Thank you.