javipalanca / spade

Smart Python Agent Development Environment
MIT License
258 stars 98 forks source link

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

Open rakeshpimplikar opened 4 years ago

rakeshpimplikar commented 4 years ago

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 commented 4 years ago

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: