Objective-C 中Socket常用转换机制(NSData,NSString,int,Uint8,Uint16,Uint32,byte[],int8_t,int16_t,int32_t,f...
int类型转16进制hexstring//int转16进制-(NSString*)hexFromInt:(NSInteger)val{return[NSStringstringWithFormat:@"%X",val];}2.16进制转换为NSData+(NSData*)dataFromHexString:(NSString*)hexString{NSAssert((hexString.lengt