powered by Jive Software

File transfer problem on trunk

Hi,

I can’t manage to get the file transfer work using the Smack trunk. I use input streams directly, but I also made some quick tests with the File version of receiveFile and I got the same behavior.

After some debugging work, this is what happen :

  • the file transfer is successfully negociated : Socks5 is used

  • the sender gets the OutputStream, notifies my code, which starts to write data.

  • the receiver times out, waiting for the first item of the input stream (Smack code) and my code never receive the input stream.

I took care of starting new threads during notification, to avoid blocking the packer listener.

Does anyone already had this problem ? Are file transfers broken in trunk ? Anyone using input streams directly ?

I used Smack 2.5 before upgrading to trunk and I had no problem with file transfer. I know the API changed, and I rewrote most of my code everything works but this.

Thanks

Nicolas

It was my fault. I used Apache commons IO library to write in the outputstream and data was not send even if data size was over 16k (seems to be a large cache somewhere). If you have problems with file transfers (no response), make sure the sender stream is flushed and closed.