Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect to an XMPP server hosted on a different machine #75

Open
rakeshpimplikar opened this issue Jan 10, 2020 · 1 comment
Open

Comments

@rakeshpimplikar
Copy link

  • SPADE version: 3.1.4
  • Python version: 3.6.8
  • Operating System: Windows 10

Description

I am trying to create a simple HelloWorldAgent by inheriting from spade Agent class. I have hosted my XMPP server on a different machine with host name abc.com. I am using Prosody IM for XMPP server. It allows jid with any domain name. I have created a jid john@pqr.org.

While creating an instance of the HelloWorldAgent, I pass on the jid john@pqr.org and password. There is no way to pass XMPP server host to the Agent constructor. How can I initialize a HelloWorldAgent with jid john@pqr.org hosted on abc.com?

@javipalanca
Copy link
Owner

Why you use the pqr.org domain for the JID?
If the XMPP server is at abc.com, shouldn't the agent's jid be john@abc.com?

The jid is always made of 4 components:

  • name of the agent
  • @
  • xmpp server domain
  • /resource (irrelevant)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants