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.