Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Please guide me to file tranfers ....
Avatar
mayprog #1
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Subject: File Tranfers Again ..
I have read many topics in Ag Forums regarding file tranfers but still i can't find out how to do my job!
Well, i need to implement file tranfer functionallity that doesn't have problems with Firewalls/NAT etc
As i figured out OOB which is simple and straight forward cannot be used in that context as it has many problems with non-intranet transfers.

In the project I am building we use Windfire server which lately supports file transfers (Jep 0096).

But i cannot find out how to set up such a transfer.
First of all, is SI protocol (JEP-0095: Stream Initiation) required for this task?
Also is Jep 0096 implemented in your SDK?
I heared about BYTESTREAMS and SOCKS5.... are these implemented?
Can i use something else ?

I reallly need help!

Also i tryied to use TortoiseSVN in order to get the code from SVN repository. It keeps requesting a passoword. What should i use?

Thanks in advance!
This post was edited on 2006-06-01, 21:08 by mayprog.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

what wildfire supports no on the server is JEP-0065 SOCKS5 bytestreams. And this is the way to go now. That means if both sides are behind NAT and firewalls and you can't establish a direct socket connection between these 2 parties the file will be sent thru the proxy on the server. Everything you need on the XMPP side is in the SDK. The SOCKS5 sockets which transfer the file are not in agsXMPP, because this part is nit XMPP related and another protocol.

see also this thread:
http://forum.ag-software.de/forum.php?req=thread&id=200

Alex
This post was edited on 2012-01-31, 19:40 by Alex.
Avatar
mayprog #3
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Alex,
thank you very much for your answer.

Well you where right with cvn,by mistake i tryied to upload !!! not download the files.

About file transfers .... well i will read more to find out the way to accomplish the task.
I found on the source code in the CVN  the "agsxmpp\trunk\protocol\extensions\bytestreams".
Where is it used for?

Thanks again!
This post was edited on 2006-06-01, 23:48 by mayprog.
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by mayprog:
About file transfers .... well i will read more to find out the way to accomplish the task.
I found on the source code in the CVN  the "agsxmpp\trunk\protocol\extensions\bytestreams".
Where is it used for?

In this namespace are all the classes you need for building then XML packets for SOCKS5 bytestream file transfers.

  • read the JEP-0065, it protocols the file transfer very good and describes all details.
  • download existing clients (PSI, Exodus, jBother, Spark etc...) which support SOCKS5 filetransfers and have a XML Debug console. Try to send a file between this clients and take a look at the Debug XML. You can also sniff the SOCKS5 traffic with a network sniffer.
  • Try to implement it in your software with the docs and logfiles.

Alex
Avatar
mayprog #5
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Alex thanks for your support.
I must say you are doing a great job and you are helping us developers, "newbies" on XMPP, very much.

The quallity of Ags Xmpp SDK and the quallity of your support is the reason I use your SDK and
soon enough my company is going to by a commercial licence for you product.

Thank you Very Much.
Avatar
Alex #6
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Thank you mayprog.

We know that file transfer is very important for the most people. And im really sorry that we can't help more on this topic at the moment. A small file transfer sample has very high priority on our TODO list. I hope we will find some time for that task in the next weeks. Because we think good code samples are always better than any documentation.

Lots of people expect that the MiniClient is a full featured chat client, which they can release as a software product with some small changes. Such a MiniClient is not our intention and will never happen. Which does not mean that we don't have this kind of software :-D

Alex
Avatar
mayprog #7
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Well, in my opinion MiniClient should be a good reference to your SDK and thats all.
Of course it is not (and not indended to be as i can imagine) a full Xmpp client.

Everyone can imagine that with your Knowledge on the field definatey you should be part of  a commercial Xmpp Client project..... ;-)
But can you give me a clue about which is it?  :-) Be shure that it will be the first in my list to experience with ....

Also, i have read more on the "File Tranfer" topic and i would like to question you, do you think a new client should support the option of file tranfers with Stream Inition to have a fallback mechanism to OOB or is it waste of time?
Avatar
Alex #8
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by mayprog:
Everyone can imagine that with your Knowledge on the field definatey you should be part of  a commercial Xmpp Client project..... ;-)
But can you give me a clue about which is it?  :-) Be shure that it will be the first in my list to experience with ....

we have Non-Disclosure Agreements, so we can't talk about this software in the forum. We are also working on a new own client. We hope that we can post some screenshots of the progress and a beta version soon.

Quote by mayprog:
Also, i have read more on the "File Tranfer" topic and i would like to question you, do you think a new client should support the option of file tranfers with Stream Inition to have a fallback mechanism to OOB or is it waste of time?

if you want implement also OOB then i makes sense.
I personally really like the OOB file transfer. It's simple and works pretty well (KISS). People also combined it with WEBDAV, HTTP-Post or Universal Plug'n'Play to solve the NAT issues. Nothing is easier than writing a 10 lines php script to accept files via POST and store them in a predefined writable directory on a webserver. The other client can download them with a standard .NET webrequest. And even if another client does not support file transfers at all, he can click on the link in the chat window and download the file with the standard webbrowser on the machine.

Alex
Avatar
mayprog #9
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Alex,

i am trying to implement file tranfer by using SOCKS5 Bytestreams,
i checked out the lastest code from your cvn and i compiled it.
I had some problems with si and siiq as the library couldn't identify the si element.
After some searching i figured out the problem:
from the ElementFactory class there are missing 2 entries in the static contructor:
AddElementType("feature",Uri.FEATURE_NEG,typeof(agsXMPP.protocol.extensions.featureneg.FeatureNeg));
AddElementType("query",Uri.BYTESTREAMS,typeof(agsXMPP.protocol.extensions.bytestreams.ByteStream));

The first for SI and the second for ByteStreams.
That solved my problems.

Also, working with si i tryied to return error codes by using your agsXMPP.protocol.client.Error.
I think you should add there the "Profile Not Understood" Condition and some more about Si and Bytestreams.

I "sniffed" Spark messages by using their trace window.
There where some times that for bytestreams they were not sending me any Streams (ByteStream namespace without any streamHost in it).
Is this right?
Also, for Spark there was never a _zeroConf streamhost, the Jeps says there must always be one.

I would like to ask you more:
- jep 0065 says that communication should always come by using SOCKS5 protocol. My question is that normally a server in the list of the streamhosts it returns first its own ip (for direct communication) and then the proxys ip for "mediated" communication. So, should i implement in my application the server side SOCKS5 protocol?(That's because the other side will always use SOCKS5 even if it establishes a peer-to-peer conenction with me).

Also, do you know a good c# library handling SOCKS5 protocol that i could use?

Thanks again!
This post was edited on 2006-06-05, 11:54 by mayprog.
Avatar
mayprog #10
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Also, about OOB and Web Posts...
you are propably rigth but my conserns have to do with the file size the user wants to tranfer and the securrity of the content of the user.

Another issue is multiple-file tranfer.
I have some ideas on implementing this onto SI with custom namespaces but do you know a better approach or a jep describing this (as far as i know all jeps are talking about single file tranfer)?
Avatar
Alex #11
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
could you please explain what you exactly mean with multiple file transfers?
If you want to transfer multiple files then you just do the same procedure multiple times.

Alex
Avatar
mayprog #12
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
In case someone wants to tranfer a hall directory of files, or 2 or more together i don't think the approach of sending si packets and negotiating for each file is the right solution.
I do think that there should be a "file schema" available to sent or a "file drectory" were after the initial negotiation, all files would walk throug the same road ....

Thanks.
Avatar
Alex #13
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello mayprog,

yes in this case you would initialize the session for each file. But this does not mean that all the files are transfered thru the same pipe. You setup a new socket for each file, which means you can transfer them simultaneous.
Anyway i think it's the client part to offer a better solution here. If you allow the user to choose multiple files with a file dialog then you could zip all the files using the SharpZipLib before you initialize the file transfer. Or you could write some other own XMPP extension, because extensibility is the big strength of XMPP.

Alex

PS: I have seen a photo sharing application based on XMPP. They transfer lots of files. But i can't remember the name of this app right now.
Avatar
mayprog #14
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Well about simultaneous file tranfers i am not into it, as it would create a very big bandwidth demand on the Initiator and it would be too complex to develop (how many files will be tranfered at the same time the most, which files, how to handle the reconstruction of the directory structure, what if a file where corrupteed etc).

I think i am going to use either the zip or the custom packets solution. These where my thoughts too.

Alex, i would like you to answer me please another reply i posted (mayprog  Yesterday, 11:49 (http://forum.ag-software.de/forum.php?req=thread&posti…) ) in this topic on which i question you many thinks.
Thanks again!
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