Get other connectable IP in subnet of HotPost.
Use the SimplePing provided by Apple.
add header file.
#import "SGIPGetter.h"
[[SGIPGetter shared] sg_getDeviceIP:^(NSArray<NSString *> *ips) {
NSLog(@"%@", ips);
}];
Now you can configure the timeout of each ping operation.
[[SGIPGetter shared] configureTimeoutOfEachPing:0.5];
This IPGetter will cache the IPs you got automatically, so call the refresh method before you get IPs when network environment has changed.
[[SGIPGetter shared] refresh];