• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Odd DO Problem...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Odd DO Problem...
      • From: Laurent Daudelin <email@hidden>
  • Prev by Date: Re: How to get mouse moved events?
  • Next by Date: Re: How to get mouse moved events?
  • Previous by thread: Re: [APP IDEA] Desktop Background Scripting
  • Next by thread: Re: Odd DO Problem...
  • Index(es):
    • Date
    • Thread