Last active
January 1, 2016 22:48
-
-
Save aug2uag/8212026 to your computer and use it in GitHub Desktop.
ÜberSimplePing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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