I am trying to pass object to the server through socket connection in actionscript 3. What is the best way to do that?
is serialization better?
or should I encode it first and then sent it as string?
please help me to understand this?
thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your object is implementing IExternalizable and you call registerClassAlias you are safe to use readObject and writeObject. Note however that no constructor parameters are allowed when implementing IExternalizable.
For instance:
You are then safe to call readObject and writeObject on any IDataOutput or IDataInput which is for instance a Socket, ByteArray or URLStream.