Re: Odd DO Problem...
Re: Odd DO Problem...
- Subject: Re: Odd DO Problem...
- From: Laurent Daudelin <email@hidden>
- Date: Sun, 25 Jan 2004 09:23:26 -0500
on 25/01/04 00:35, Dave Keck at email@hidden wrote:
>
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...
Why not sending an NSArray containing NSNumbers?
-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <
http://nemesys.dyndns.org>
Logiciels Nemesys Software
mailto:email@hidden
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe, trying to produce
bigger and better idiots. So far, the Universe is winning."
-Rich Cook
_______________________________________________
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.