File Transfer using bytestreams

Document created by francisco on Nov 15, 2007Last modified by francisco on Nov 15, 2007
Version 2Show Document
  • View in full screen mode

Debugging File Transfer using bytestreams where User 1 sends a file to user 2 successfully.

 

Let's analyze in deep the packets sent in a file transfer.

1- user 1 ask the file transfer using bystreams or ibb at: 7:32

 
<iq id="iuUr9-64" to="user1@hostname/spark" from="user2@hostname/spark" type="set">
  <si xmlns="http://jabber.org/protocol/si" id="jsi_9214186531132661055" mime-type="application/xml" profile="http://jabber.org/protocol/si/profile/file-transfer">
    <file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="build.xml" size="24739">
      <desc>Sending file</desc>
    </file>
    <feature xmlns="http://jabber.org/protocol/feature-neg">
      <x xmlns="jabber:x:data" type="form">
        <field var="stream-method" type="list-multi">
          <option>
            <value>http://jabber.org/protocol/bytestreams</value>
          </option>
          <option>
            <value>http://jabber.org/protocol/ibb</value>
          </option>
        </field>
      </x>
    </feature>
  </si>
</iq>

   

 

2- User 2 accept the file transfer supporting bystream and ibb at 06:08

 
<iq id="iuUr9-64" to="user2@hostname/spark" from="user1@hostname/spark" type="result">
  <si xmlns="http://jabber.org/protocol/si">
    <feature xmlns="http://jabber.org/protocol/feature-neg">
      <x xmlns="jabber:x:data" type="submit">
        <field var="stream-method">
          <value>http://jabber.org/protocol/bytestreams</value>
          <value>http://jabber.org/protocol/ibb</value>
        </field>
      </x>
    </feature>
  </si>
</iq>

 

 

3- user 1 propose bystream transfer using proxy.hostname at port 7777

 
<iq id="iuUr9-65" to="user1@hostname/spark" from="user2@hostname/spark" type="set">
  <query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_9214186531132661055" mode="tcp">
    <streamhost jid="proxy.hostname" host="10.211.167.227" port="7777"></streamhost>
  </query>
</iq>

 

 

4- user 2 accept it

 
<iq id="iuUr9-65" to="user2@hostname/spark" from="user1@hostname/spark" type="result">
  <query xmlns="http://jabber.org/protocol/bytestreams">
    <streamhost-used jid="proxy.hostname"></streamhost-used>
  </query>
</iq>

 

 

5- User 1 sends the file through the proxy (proxy.hostname) and the proxy notify user 2

 
<iq id="iuUr9-66" to="proxy.hostname" from="user2@hostname/spark" type="set">
  <query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_9214186531132661055">
    <activate>user1@hostname/spark</activate>
  </query>
</iq>

 

 

6- Finally user 2 notify the end of the file transfer

 
<iq id="iuUr9-66" to="user2@hostname/spark" from="proxy.hostname" type="result"/>

 

Attachments

    Outcomes