I have strange issue
Server sending function
-(void) writeToServer:(const uint8_t *) buf {
NSLog(@"sending buf %s with lenght %zd", buf, strlen((char*)buf));
[oStream write:buf maxLength:strlen((char*)buf)];
// NSOutputStream *oStream
}
buf is
NSLog(@"converted %@ length %d", encrypted, [encrypted length]);
// encrypted is NSMutableData
return (const uint8_t*)[encrypted bytes];
Output
converted <4b010000 00000006 00000000 00000f20 30303031 4e50> length 22
sending buf K with lenght 2
I need buf to remain the same.. with same raw bytes and proper lenght, how should i do that?
Pass the
NSDataobject in directly: