I have two air applications that communicate with each other using sockets.
Code on app 1
socket.writeUnsignedInt(4);
Code on app 2
socket.readUnsignedInt();
I am expecting the result of readInt() to be ‘4’ (the int I sent) but I get ‘262144’
any help would be much appreciated.
The 262144 value in hex is
00 04 00 00, most likely your stream is out-of-sync, i.e. you read too few bytes from it beforereadUnsignedInt()call.