Re: NSData Question
Re: NSData Question
- Subject: Re: NSData Question
- From: Wade Tregaskis <email@hidden>
- Date: Fri, 10 Oct 2003 00:31:44 +1000
I know what I have to do in php, there the data to send is:
"\xFF\xFF\xFF\xFFmyCommand\n"
And i know that FF is 255 in decimal in the ascii table.
My problem is that i don't know how i can add this value to the NSData
*data.
const static UInt32 prefix = 0xffff;
NSMutableData *myMessage = [NSMutableData dataWithBytes:&prefix
length:sizeof(UInt32)];
Then use NSMutableData's append methods to add your string on.
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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.