Odd DO Problem...
Odd DO Problem...
- Subject: Odd DO Problem...
- From: Dave Keck <email@hidden>
- Date: Sun, 25 Jan 2004 00:35:14 -0500
I'm writing a client/server that uses distributed objects and works
over TCP. I'm using unsigned char arrays to send data (specifically,
images), but I've run into a nasty problem.
Whenever there's a byte that's assigned 0 in the unsigned char array,
the DO system thinks that's the end of the unsigned char array, causing
all the data after the 0 to be gibberish. One way I've thought of
getting around this problem is setting all the 0's to 1's and then
sending another array telling what indexes need to be changed from 1 to
0. This would allow the data to be sent to the client, and the client
would change all the necessary 1's to 0's.
Although this would probably work, it would cause the application to
slow down, and it seems like a fairly large work-around.
Is there another/a better way of sending data, that will accept 0's? I
tried encapsulating the data into an NSData object awhile back, but I
don't remember it working...
Thanks very much for any help or insight,
Dave
_______________________________________________
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.