robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

Cross platform(IOS to ANDROID vice-versa) file transfer not working. #494

Open rahulsingh2k10 opened 9 years ago

rahulsingh2k10 commented 9 years ago

I am trying to transfer the file between IOS and ANDROID. It is working fine if I try to transfer the file between IOS to IOS. But when I try to send the file from IOS to ANDROID or ANDROID to IOS SOCKS5 creates some issue in sending the data. Following is the description for the same.

After I exchange my stream hosts ANDROID starts a local connection with my device but during the SOCKS5 authentication my connection response seems to have some issue. Following are the detail of it.

Initalially it sends 2 Bytes which is correct as I suppose to be (Correct me if I am wrong), then it sends another 3 bytes in which the last byte is different from the one that it sends during a proxy connection. Due to this, my local connection fails, but via proxy I am able to connect and transfer the data. How do I resolve this as I want my connection to be formed as a direct or local connection? This process is working fine if transferred between same ((IOS to IOS) and (ANDROID TO ANDROID using Smack Library) ) platform.

Please respond asap as I have been facing this issue for a long time. Thanks And Regards, Rahul

jonstaff commented 9 years ago

I could be wrong on this, but last time I looked at Smack, I'm pretty sure it requires you go through a proxy. Even with the XMPPFramework, you'll end up transferring via proxy the majority of the time due to NAT.

rahulsingh2k10 commented 9 years ago

Thanks for the information. Actually I am using local router for connection. Also, when I am creating connection from Android, it is creating direct connection but when I initiate the same from IOS it is creating a proxy. Could you explain me why is it so? We have also found that the SOCKS5 authentication implementation is different for PROXY and DIRECT connection while in SMACK it is exactly same. Could you let me know how could we make it same in case of XMPPFramework so that it resembles with the SMACK Library?

judges commented 8 years ago

@rahulsingh2k10 Did you achieve cross chat from server?