NSError使用

  
  
  
  
  1. NSString * host = @"192.168.2.151";
  2. int port = 35000;
  3. asyncSocket = [[AsyncSocket alloc] initWithDelegate:self];
  4. NSError *err = nil;
  5. if(![asyncSocket connectToHost:host on:port error:&err])
  6. {
  7. NSLog(@"Error: %@", err);
  8. }
http://mobile.51cto.com/iphone-278510.htm

你可能感兴趣的:(NSError使用)