Your NSLog() is giving unexpected results because you are using %s.
This is a cstring (not NSString), which is null-terminated. What you
probably mean is this (at least for testing purposes):
NSLog (@socketCallback (DMX event). %@ %i bytes, msg, [msg length]);
This will print the hex codes
(2) But in any case, NSString doesn't mind embedded null bytes.
(It's not null-terminated like a C string; the string object
remembers the length separately.) That doesn't mean you should store
binary data in an NSString, though. NSData is better for that.
NSString isn’t really too happy
Hi,
I have a device which basically outputs a UDP data stream. FYI the
protocol specs are at : http://www.enttec.com/docs/enttec_protocol.pdf
I found a really helpful post on the forum here titled : Re: Listen
on a UDP Port( http://lists.apple.com/archives/cocoa-dev/2008/Feb/