Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
evilempire22 #1
Member since Oct 2006 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: File Transfer Question
I scoured the forums here to try and find an answer, but couldn't find one. My situation is this:

I am building a client that should be able to communicate with other clients on our Jabber server. Some users use RhymBox or Pandion to chat, while others will be using the client I am creating. Sending messages back and forth using my app, Pandion, and the MiniClient is no problem. I can also send files between multiple instances of my client apps and between my client app and the MiniClient, but what doesn't work is trying to send a file between my client app and someone using Pandion for example (and vice versa). Does anyone have any knowledge as to why this doesn't work or can point me in the direction of some more info? Thanks in advance!
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

i assume you build your client on top of our MiniClient sample

  • The MiniClient is using XEP-0065 SOCKS5 Bytestreams for filetransfers.
  • Pandion is using the old XEP-0066 Out of Band Data (OOB) for filetransfers.

This both are of course not compatible. You can add the old OOB filetransfers to your client pretty easy. OOB is supported by the agsXMPP SDK. In OOB the files are transfered over the HTTP protocol. The sender's client acts as a small webserver where the other client can download the file. Both is pretty easy in .NET with the HttpListener and HttpWebRequest classes.

Alex
Avatar
evilempire22 #3
Member since Oct 2006 · 10 posts
Group memberships: Members
Show profile · Link to this post
New problem: I can successfully transfer files between my client and the Miniclient, but not between 2 instances of my own client.

I get an error message back when the following code is executed:


        private void SendSiIq()
        {
               ...
               Connection.IqGrabber.SendIq(iq, new IqCB(SiIqResult), null);
        }

        private void SiIqResult(object sender, IQ iq, object data)
        {
              //When this method is called, the iq.type is IqType.error, with error code 405, any idea what would cause this?
        }

No messages even get to the other client, so I am guessing that when the SendIq is sent, something is not correct with the query? The code of my SendSiIq() function is identical to that of the MiniClient, and I have (hopefully) implemented the file send functionality the same in my client as the MiniClient, so I don't know what else could be wrong.

EDIT: Figured this out right after I posted. I was doing something different that the MiniClient example. I was forgetting to set the resource of the JID before calling the form to send the file, as in the MiniClient code below. My client was missing the middle line. Works great now!

                    Jid jid = node.RosterItem.Jid;
                    jid.Resource = node.FirstNode.Text;
                    frmFileTransfer ft = new frmFileTransfer(XmppCon, jid);
This post was edited on 2006-10-12, 18:24 by evilempire22.
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