Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. CFHostClientContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
  2. CFStreamError streamError;
  3.  
  4. assert(self->_host == NULL);
  5.  
  6. self->_host = CFHostCreateWithName(NULL, (__bridge CFStringRef) self.hostName);
  7. assert(self->_host != NULL);
  8.  
  9. CFHostSetClient(self->_host, HostResolveCallback, &context);
  10.  
  11. CFHostScheduleWithRunLoop(self->_host, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
  12.  
  13. NSLog(@">CFHostStartInfoResolution");
  14. success = CFHostStartInfoResolution(self->_host, kCFHostAddresses, &streamError);
  15. NSLog(@"<CFHostStartInfoResolution");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement