| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
[snipped]
It's probably freaking out because of the 255. How I'd handle this with AsyncSocket is to use readDataToData: to read one line at a time. Use an NSData of one byte, 255, as the ...ToData: parameter. Then use this:
int lineLength = [data length] - 1 /* to ignore the 255 */;
NSString *line = [NSString stringWithCString:[data bytes] length:lineLength];
That should work.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Re: NSData encoding issues... (From: Dustin Voss <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.