I am using a chat application. I want to transfer a file, but I lose TURN Connection all the time! I am using the code below:
XMPPJID *jid = [XMPPJID jidWithString:@" user@krishanyadav.local /resourceID"] ; TURNSocket *turnSocket = [[TURNSocket alloc] initWithStream:[self xmppStream] toJID:jid]; [turnSockets addObject:turnSocket]; [TURNSocket setProxyCandidates:@[JABBER_DOMAIN_NAME, JABBER_DOMAIN_NAME]]; [turnSocket startWithDelegate:self delegateQueue:dispatch_get_main_queue()]; - (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."); [turnSockets removeObject:sender];} - (void)turnSocketDidFail:(TURNSocket *)sender { NSLog(@"TURN Connection failed!"); [turnSockets removeObject:sende }
how can I transfer a file using iOS xmpp jabber2 server.
NOTE. I can send a file from Audim to iMessage messenger (from and with each other) from the server.
source share