I am cre开发者_如何学运维ate a NSData file from the image and sending over server using socket.
CFWriteStreamWrite(myWriteStream, (const UInt8 *)data, [data length]);
But the server receives it in different format. and unable to open file.
What's the type of 'data' in your code snippet?
If it was a (NSData *) object, you should write like:
CFWriteStreamWrite(myWriteStream, (const UInt8 *)[data bytes], [data length]);
精彩评论