0

How can transfer the file one user to another.I am using xmpp protocol for connection I have tried below code for connection. But I get message every time connection fail.

[TURNSocket setProxyCandidates:@[@"testserver-desktop"]];

XMPPJID *jid = [XMPPJID jidWithString:@"256122466@testserver-desktop"];


TURNSocket *turnSocket = [[TURNSocket alloc] initWithStream:[self xmppStream] toJID:jid];

[turnSockets addObject:turnSocket];

[turnSocket startWithDelegate:self delegateQueue:dispatch_get_main_queue()];
[turnSocket release];

// delegate - (void)turnSocket:(TURNSocket *)sender didSucceed:(GCDAsyncSocket *)socket {

NSLog(@"TURN Connection succeeded!");
NSLog(@"You now have a socket that you can use to send/receive data to/from the other person.");

}

  • (void)turnSocketDidFail:(TURNSocket *)sender {

    NSLog(@"TURN Connection failed!");

}

Please let me how to make connection between two user for file transfer.

Kiran K
  • 919
  • 10
  • 17
  • Are you sure testserver-desktop is reachable? You may need to specify its IP address directly. – Dany Joumaa Aug 01 '13 at 18:16
  • Yes Dany,testserver-desktop is reachable. You have done such type of connectivity and transfer the file,image video etc.If yes please share to me. – Kiran K Aug 07 '13 at 08:52
  • possible duplicate of [FileTransfer using XmppFrameWork in ios](http://stackoverflow.com/questions/20114783/filetransfer-using-xmppframework-in-ios) – legoscia Jul 23 '14 at 09:42

0 Answers0