Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
  2. if (connection==connSend) {
  3. responseSend = [[NSMutableData alloc]init];
  4. [responseSend setLength:0];
  5. }
  6. else{
  7. responseData = [[NSMutableData alloc]init];
  8. [responseData setLength:0];
  9. }
  10. }
  11.  
  12. - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
  13. if (connection==connSend) {
  14. [responseSend appendData:data];
  15. }
  16. else{
  17. [responseData appendData:data];
  18. }
  19. }
  20.  
  21. -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
  22. if (connSend==connection) {
  23. [logData AppendToStringFile:[NSString stringWithFormat:@"Error in sending Bonus challenge:%@",error]];
  24. }
  25. else{
  26. [logData AppendToStringFile:[NSString stringWithFormat:@"Error in Get Immediate Bonus challenge:%@",error]];
  27. }
  28. }
  29.  
  30. - (void)connectionDidFinishLoading:(NSURLConnection *)connection{
  31.  
  32. if (connection==connSend) {}
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement