title: How to transfer image One device to another device using xmpp framework on iphone?
body: <p>I have made one-To-one chat application using xmpp protocol. Now I want to send image and video in my application. I have search many about the file transfer but i didn't find out the solution. I am using below code for Socket connection. </p>
  
  <p>Please help me how can I do this.</p>
  
  <p>My Code is :</p>
  
  <pre><code>[TURNSocket setProxyCandidates:@[@"MyserverHost-desktop"]]; 
  
  XMPPJID *jid = [XMPPJID jidWithString:@"1254225445@MyserverHost-desktop"];
  
   TURNSocket *turnSocket = [[TURNSocket alloc] initWithStream:[[self appDelegate]xmppStream] toJID:jid]; 
  
  [app.turnSocketArray addObject:turnSocket]; 
  
  [turnSocket startWithDelegate:self delegateQueue:dispatch_get_main_queue()]; 
  [turnSocket release]; 
  
  - (void)turnSocket:(TURNSocket *)sender didSucceed:(GCDAsyncSocket *)socket 
  { 
  
  }
  - (void)turnSocketDidFail:(TURNSocket *)sender
  {
  
  }
  </code></pre>
  
  <p>Every time Connection fail method call..</p>
  
  <p>Thanks.</p>