Hi, i have the next code:
NSURL *url = [NSURL URLWithString:@"http:...."];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [""soapMessage"" length]];
[theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"];
[theRequest setHTTPMethod:@"POST"];
[theRequest setHTTPBody: [""soapMessage"" dataUsingEncoding:NSUTF8StringEncoding]];
[theRequest setTimeoutInterval:20];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
[theConnection start];
Then sometimes, when i click a lot of times (Just to try where can fail the app) in my interface in the buttons assigned to start a new connection, the connection doesn't give a reply (I send the request but looks like is blocked after).
I would like to know what is the use of "setTimeoutInterval"? AND if there are some ways to limit the time to wait one response?
Thanks!