Why do not you use NSTimer
to run a timer which will run every 10 seconds to check the status of connection?
NSTimer
reference is given here. There are many static methods to create a timer. You can use for example:
+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)seconds target:(id)target selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)repeats
You can use it as
NSTimer * timer = [NSTimer timerWithTimeInterval:10 target:myobject selector:checkConnectionStatus userInfo:nil repeats:YES];
where myobject
will be an Objective-C object and its method -checkConnectionStatus
or which method you like will check the status of the connection.