发布网友 发布时间:2022-05-05 11:42
共2个回答
热心网友 时间:2022-06-27 11:29
iphone获取本机IP -(NSString *)getAddress { char iphone_ip[255]; strcpy(iphone_ip,"127.0.0.1"); // if everything fails NSHost* myhost =[NSHost currentHost]; if (myhost) { NSString *ad = [myhost address]; if (ad) strcpy(iphone_ip,[ad cStringUsingEncoding:NSASCIIStringEncoding]); } return [NSString stringWithFormat:@"%s",iphone_ip];}热心网友 时间:2022-06-27 11:29
虚拟端口Ap