Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page: previous  1  2  3  4  5  6  7  next
Avatar
BennyM #46
Member since Jul 2006 · 2 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1102
I think there's an error in the code supplied for File Transfer, I've compared the xml packets generated by exodes, wildfire and the file transfer example supplied here.

In frmReceiveFile, method AcceptFileTransfer we have these lines:

  Option option = new Option();
  option.SetValue(agsXMPP.Uri.BYTESTREAMS);
  field.AddOption(option);

which generates:
    <field var="stream-method">
        <option>                   
            <value>http://jabber.org/protocol/bytestreams</value>
        </option>
    </field>

shouldn't that be

field.SetValue(agsXMPP.Uri.BYTESTREAMS);

which generates:

   
<field var="stream-method">
        <value>http://jabber.org/protocol/bytestreams</value>
    </field>
Avatar
Jabberer #47
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

When sending the form to a client then you must include the option tag.
  1. <iq id="jcl_50" to="x@jabber.org/Psi" type="set">
  2.     <si id="jcl_518500668" mime-type="binary/octet-stream" profile="http://jabber.org/protocol/si/profile/file-transfer" xmlns="http://jabber.org/protocol/si">
  3.         <file hash="1bc5b77f3e50b7fbe12c792ee438da45" name="Sonnenuntergang.jpg" size="71189" xmlns="http://jabber.org/protocol/si/profile/file-transfer"/>
  4.         <feature xmlns="http://jabber.org/protocol/feature-neg">
  5.             <x xmlns="jabber:x:data">
  6.                 <field type="list-single" var="stream-method">
  7.                     <option>
  8.                         <value>http://jabber.org/protocol/bytestreams</value>
  9.                     </option>
  10.                 </field>
  11.             </x>
  12.         </feature>
  13.     </si>
  14. </iq>

The response does not include the option tag.
  1. <iq id='jcl_50' type='result' to='y@jabber.org/Exodus' from='x@jabber.org/Psi'>
  2.     <si xmlns='http://jabber.org/protocol/si'>
  3.         <feature xmlns='http://jabber.org/protocol/feature-neg'>
  4.             <x type='submit' xmlns='jabber:x:data'>
  5.                 <field var='stream-method'>
  6.                     <value>http://jabber.org/protocol/bytestreams</value>
  7.                 </field>
  8.             </x>
  9.         </feature>
  10.     </si>
  11. </iq>

see also JEP-0004 Data Forms
Software Developer
AG-Software
Avatar
BennyM #48
Member since Jul 2006 · 2 posts
Group memberships: Members
Show profile · Link to this post
Indeed, that's what I said not? The extended miniclient example however, is not doing this.
Avatar
Jabberer #49
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
yes, then you have to fix the AcceptFileTransfer method in Simon's MiniClient extension.
Or perhaps Simon can do it, not sure if he still follows this thread.
Software Developer
AG-Software
Avatar
chrisrichmond #50
Member since Aug 2006 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: File transfer code
Hi all,

Ok...I downloaded the latest from SVN, built in VS 2005, no problems....downloaded the miniclient..no problem....but now I am trying to determine what to do to incorporate the file transfer code that some of you have posted, so I grabbed the most recent FTChanged.zip from page 3 of this thread:

http://forum.ag-software.de/forum.php?req=thread&id=21…

and applied those changes to my SVN code base, but the new project referencing all sorts of files that are missing.  Obvouosly I do not have all the files, so can anyone help me with what I am missing?

Aloha and thanks,
Chris
Avatar
chrisrichmond #51
Member since Aug 2006 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: additon
In case it helps anyone with my poste immediately before this one, here are the files VS is saying the projec file is missing..

error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\component\accept\Log.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\stream\SessionIq.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\stream\Error.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\client\Stream.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\stream\BindIq.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\stream\Session.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\stream\Bind.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\component\accept\Route.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\component\accept\Handshake.cs' could not be opened ('The system cannot find the file specified. ')
error CS1504: Source file 'C:\XMPP\agsxmpp\trunk\protocol\server\Stream.cs' could not be opened ('The system cannot find the file specified. ')
Avatar
Alex #52
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

the file transfer sample here was posted and developed by simons. He applied patches to the MiniClient and the agsXMPP SDK. This was a while ago and there were many updates in the SDK since he posted the patch.

I assume you patched also the project files. Because we have done some refactoring in the last weeks it doesn't find the files now. THey are located in other namespaces now. So you have to update your project files and make changes to simons code to get it working with the latest code.

If somebody wants to work on this code we would appreciate if it works without patching the SDK and all code is included with the MiniClient. The SDK contains everything you need for filetransfers and there is no need to patch it.

All registered users please contact our support team for file transfer sample code.

Alex
Avatar
chrisrichmond #53
Member since Aug 2006 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: SDK clarity
Alex,

Thanks so much for your reply, but when you say the SDK contains everything needed for file transfer, do you meen the codebase from SVN or the download on the webpage? 

And if it supports file transfer, then I need to upgrade miniclient, correct? Is this the work you are requesting to be done?

Thanks,

Chris
Avatar
Alex #54
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

the SDK includes everything you need for filetransfers on the XMPP side. It shouldn't matter if you use the SVN cwebpage download. There are also lots of different ways to transfer a file in XMPP. The XMPP part is the negotiation. The other part is the p2p part which is needed for some file transfer methods. Simon has done this for the  SOCKS5 Bytestreams.

look also at the socket class i posted which does all the p2p stuff.

I would be cool if simon could post his complete working library and MiniClient client code. Then everybody has a running example and could merge this code in own applications.

Alex
Avatar
scharfed #55
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
Hello,

the SDK includes everything you need for filetransfers on the XMPP side. It shouldn't matter if you use the SVN cwebpage download. There are also lots of different ways to transfer a file in XMPP. The XMPP part is the negotiation. The other part is the p2p part which is needed for some file transfer methods. Simon has done this for the  SOCKS5 Bytestreams.

look also at the socket class i posted which does all the p2p stuff.

I would be cool if simon could post his complete working library and MiniClient client code. Then everybody has a running example and could merge this code in own applications.

Alex

Yes, that would be much appreciated.
Avatar
simons #56
User title: Simon shaw
Member since May 2006 · 30 posts
Group memberships: Members
Show profile · Link to this post
Working on it guys, I have been on vacation and have to merge my code into the new stream.  Should be ready in a couple of days.
Avatar
Alex #57
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
great,
i attached the latest JEP65Socket class if you don't have it already. It also supports listen for p2p transfers.
If you run in problems lwt me know.

Alex
The author has attached one file to this post:
JEP65Socket.cs 21.8 kBytes
You have no permission to open this file.
Avatar
Alex #58
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
we decided to add a file transfer to the MiniClient sample.
see: http://forum.ag-software.de/forum.php?req=thread&id=251
Avatar
scharfed #59
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #57
Quote by Alex on 2006-08-08, 19:21:
1155057663

In the JEP65Socket class, I have encountered an error that occurs when a file is sent from MiniClient to the MiniClient on another computer.

public override void Connect()
        {
            base.Connect();

            m_ReadBuffer = null;
            m_ReadBuffer = new byte[BUFFERSIZE];
           
            m_SocksConnected = false;

            IPHostEntry ipHostInfo = Dns.Resolve(Address); <----- Error occurs on this line
            //IPHostEntry ipHostInfo = Dns.GetHostByAddress(Address);
            //Dns.GetHostEntry
            IPAddress ipAddress = ipHostInfo.AddressList[0];// IPAddress.Parse(address);
            IPEndPoint endPoint = new IPEndPoint(ipAddress, Port);

            _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
           
            _socket.BeginConnect(endPoint, new AsyncCallback(EndConnect), null);
        }

The exception is as follows:

System.Net.Sockets.SocketException was unhandled
  Message="The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for"
  Source="System"
  ErrorCode=11004
  NativeErrorCode=11004
  StackTrace:
       at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
       at System.Net.Dns.Resolve(String hostName)
       at MiniClient.JEP65Socket.Connect() in C:\Documents and Settings\Andrew\Desktop\MiniClientTest\JEP65Socket.cs:line 409
       at MiniClient.JEP65Socket.SyncConnect() in C:\Documents and Settings\Andrew\Desktop\MiniClientTest\JEP65Socket.cs:line 385
       at MiniClient.frmFileTransfer.HandleStreamHost(ByteStream bs, IQ iq) in C:\Documents and Settings\Andrew\Desktop\MiniClientTest\frmFileTransfer.cs:line 504
       at MiniClient.frmFileTransfer.<>c__DisplayClass4.<XmppCon_OnIq>b__0() in C:\Documents and Settings\Andrew\Desktop\MiniClientTest\frmFileTransfer.cs:line 464
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
Avatar
Alex #60
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

can you debug the code and post the value of Adress when its crashing?

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:
Page: previous  1  2  3  4  5  6  7  next
Forum: agsXMPP RSS