How can I read and write ints from/to NSStreams? I know I can read bytes individually, but I want to take endianness into account. Java has DataStreams for these cases, is there something equivalent in Obj-C?
How can I read and write ints from/to NSStreams ? I know I can
Share
There’s nothing like that for you in the streams. There are the standard ntoh*/hton* suite of functions to convert from network to host order and back.