Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Please help me. I'm developing chat using XMPP in iPhone.I want to send image file and emoticons when user chat message,but I get failed as following:

   
- (void)turnSocketDidFail:(TURNSocket *)sender {
    
    NSLog(@"TURN Connection failed!");
    [turnSockets removeObject:sender];
    
}

- (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.");
    NSData *dataF = [[NSData alloc] initWithContentsOfFile:
                     [[NSBundle mainBundle] pathForResource:@"defaultPerson" ofType:@"png"]];
    
    [socket writeData:dataF withTimeout:60.0f tag:0];

    
    [turnSockets removeObject:sender];
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900