I sent a multi-line data which length is more than 20 i'm sure because i've test to get the data using terminal "cn" command , but if i read the data using asyncsocket like this:
-(void)onSocket:(AsyncSocket )sock didReadData:(NSData)data withTag:(long)tag{ NSLog([NSString stringWithFormat:@"%d",[data length]]); }
I only get length of 20.. I think that's because asyncsocket only read first line of my data which length is 20. My question: How to read all data? i don't want the asyncsocket to only read my first line of data.
thanks.