Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
draekz #1
Member since Nov 2007 · 17 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to request DiscoInfo Features??
Trying to figure out a bit more about how Pidgin negotiates File transfers. I can succesfully transfer files (without NAT) with our client, but when it comes to using a client like Pidgin, it seems to request available services before it will send (makes sense).

Now I'm trying to figure out how to respond. Below is the communication observed between Pidgin and Psi.

PSI RECEIVES FROM PIDGIN:
<iq from="galaben@jabber.org/Home" type="get" id="purple120777a9" to="galadraek@jabber.org/Psi" >
<query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>

PSI RETURNS:
<iq type="result" to="galaben@jabber.org/Home" id="purple120777a9" >
<query xmlns="http://jabber.org/protocol/disco#info">
<feature var="http://jabber.org/protocol/bytestreams" />
<feature var="http://jabber.org/protocol/si" />
<feature var="http://jabber.org/protocol/si/profile/file-transfer" />
</query>
</iq>

Now if I (attempt to) do the same thing using my client, I get a different response using agsXMPP:

PSI RECEIVES FROM GALAXIUM:
<iq id="agsXMPP_9" type="get" to="galaben@jabber.org" from="galadraek@jabber.org/agsXMPP">
<query xmlns="http://jabber.org/protocol/disco#info" />
</iq>

PSI RETURNS:
<iq xmlns="jabber:client" from="galaben@jabber.org" type="result" id="agsXMPP_9" to="galadraek@jabber.org/agsXMPP">
<query xmlns="http://jabber.org/protocol/disco#info">
<feature var="vcard-temp" />
</query>
</iq>

I dont get it.... Now the first observation is that the Bare ID is used when agsXMPP sends the request using:

_discoManager.DisoverInformation (contact.Jid, new IqCB (ContactDiscoveredInfo), contact);

I'm not sure why its sending Bare, instead of the Full Jid. Then all i get back is the vcard-temp feature.

Anyone can shed a bit of light? Maybe i'm requesting it wrong..
This post was edited on 2007-12-06, 05:38 by draekz.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello draekz.

first let me say that file transfer in XMPP is still a problem and there is no real standard. Many existing clients are incompatible to each other. Implementing a file transfer which is compatible with many existing clients can cause you some headaches ;-)

Which MiniClient example were you using for your tests?
I attached a DiscoHelper class which we want to add to MiniClient with the next release.
All you have to do is to create the class and pass the XmppClientConnection, and add the features which your client supports. The DicsoHelper answers all DiscoInfo request from other clients automatically then.

Normally you send all iqs in XMPP to full jids, not to bare Jids. There are some exceptions like the Vcard Iq.
The Discomanager is using the Jid which you pass. In your case contact.Jid is a Bare Jid. You have to pass a full Jid here. Because agsXMPP does not store the resources, and can't know which resource you want to discover.

Let me know if this helps you.

Alex
The author has attached one file to this post:
DiscoHelper.cs 3.2 kBytes
You have no permission to open this file.
Avatar
Alex #3
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
attached a new MiniClient which is using the DiscoHelper class.

Alex
The author has attached one file to this post:
MiniClient.zip 96.2 kBytes
You have no permission to open this file.
Avatar
draekz #4
Member since Nov 2007 · 17 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex.

Yeah I figured that because of all the different methods it would be difficult. But I would assume that if you support out of band, in band, socks and such, it should take care of most methods. I am able to receive files from PSI when there is no firewall, but otherwise I see that if there is a router/firewall, the IP address it tries to connect to is not right. The IP address communicated is the IP address of the actual computer which will not work, it needs to be the IP address of the router. I'm trying to figure out how to do this. I know that it is possible since PSI does the transfers fine throught the firewall, and the XML looks the same to me at first glance.

There is a lot more for us to figure out, but I'll take it one step at a time :P
Avatar
Alex #5
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
for Socks5 filetransfer which is the most common file transfer in xmpp:

If both clients are firewalled or behind NAT you need a SOCKS5 bytestream proxy in the middle.
If only one client is firewalled/Natted then the firewalled client should be able to connect to the client without firewall and NAT.
But i would say that over 90% of the clients are behind NAT or have firewalls. I think direct connection works only in the intranet.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS