I have server implementation in Java using Netty and client is in Adobe Flash.
When I am sending the request or response in the buffer, I am first writing the length of the buffer and then the data. I am writing the length of the data using ChannelBuffer.writeInt() in the server side and ByteArray.writeInt() in the client side and then reading it on the other side using ByteArray.readInt() for client and ChannelBuffer.readInt() for server. But I get a wrong value for both of them.
My question is, is there a difference when I do a ChannelBuffer.writeInt() / ChannelBuffer.readInt() in java and do a corresponding ByteArray.readInt() / ByteArray.writeInt() in Adobe Flash actionscript. If yes, please tell me what is it and how to make it work.
I have tried to do some bit shifting operation to make it work, but it doesn't work. Is this dependent on Endianess ? If yes, how ? If it is not dependent, then is there anything on which this might be dependent ?
Thanks