Skip to content

Instantly share code, notes, and snippets.

@aug2uag
Last active January 1, 2016 22:48
Show Gist options
  • Save aug2uag/8212026 to your computer and use it in GitHub Desktop.
Save aug2uag/8212026 to your computer and use it in GitHub Desktop.
ÜberSimplePing
NSString* urlString = <# INSERT_URL_HERE #>;
CFHostRef _host;
CFSocketRef _socket;
assert(self->_host == NULL);
self->_host = CFHostCreateWithName(NULL, (__bridge CFStringRef) urlString);
assert(self->_host != NULL);
CFHostScheduleWithRunLoop(self->_host, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
// CFHostStartInfoResolution(self->_host, kCFHostNames, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment