NSData:dataWithBytes:length:详解 TCP/UDP/Socket粘包处理
先上代码NSString*str=@"i'mateststring";NSData*data=[strdataUsingEncoding:NSUTF8StringEncoding];NSIntegerdataLength=data.length;NSData*lengthData=[NSDatadataWithBytes:&dataLengthlength:8];NSData*newLengthD