Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:02:51+00:00 2026-05-25T06:02:51+00:00

XMPP allows users to connect to the server from multiple clients simultaneously, using the

  • 0

XMPP allows users to connect to the server from multiple clients simultaneously, using the same account. I built an application that does this but if the desktop client is enabled, I do not want the users to be able to connect using a mobile client. This is for a game and being connected to both causes problems.

So what I’m wondering is:
Is it possible to detect if there are other clients connected using the same account. If I can check for other clients, I can auto logout the user.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:02:51+00:00Added an answer on May 25, 2026 at 6:02 am

    @Flow was on the right track. If all of your client instances use the same resource, in most servers, the later-connecting client will replace the older session. The older session will get a conflict stream error, and be disconnected. You MUST be careful not to auto-reconnect with the older client, or you will have written the "dueling resources" bug.

    If you had control over your server, you have a chance at configuring it to allow a maximum of one resource for a given user, in which case the newer connection will fail with a conflict error, but you’ll have worse user interface problems if you head down that path; there will be no way to get the second client logged in, even if you wanted to.

    Finally, all resources for a given user are subscribed to that user’s presence. As long as your client sends presence in:

    <presence/>
    

    you will receive presence from each of your other devices:

    <presence to='user@example.com/resource1' from='user@example.com/resource2'/>
    <presence to='user@example.com/resource1' from='user@example.com/resource3'/>
    <presence to='user@example.com/resource1' from='user@example.com/resource4'/>
    

    You could use this to decide which client is current, perhaps by adding an extension to the presence like XEP-0115.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using openfire as XMPP server. Clients connect to it via BOSH. I'm writing
I want to connect to an XMPP server using SASL ANONYMOUS. I can use
We have an XMPP application that uses MySQL to store information. We are not
I'm using Openfire as an XMPP server, and it seems to be working great;
I am using Xmpp protocol to create chat application with the help of smack
I am Creating a chat application using XMPP Framework in iPhone. I want to
I'm using asmack XMPP with android code. I'm logging-in the XMPP server just fine,
I'm trying to authenticate with an XMPP server using SASL. /** * Send Authentication,
I am developing a chat application using XMPP/JQuery. In a chat application, for a
I am working on an XMPP client, using ejabberd as server. My question is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.