gprobe – Part 1 – Message Formats
Message transport (between the gprobe, the game server I had written for my work in my spare time and the front end client) was using json or Action Message Format, AMF. Reason for the duality, was that for quick testing, I could login into the server with simple telnet and send (textual) commands and recieve data in json format – Simple. However, I could not find a built in JSON parser for Flex and writing one (again, as I had already written one in C++ for the server side) – didnt just seem too appealing. Luckily, Flex is capable of serializing and deserializing objects in binary format over a stream – yep – the Action Message Format or AMF. Adding the AMF serializer to the server was fairly simple (did take few hints on the integer encoding from pyamf – thanks guys).
Now the problem was that I could not find a way of debugging the decoding (on the flex side) of the AMF stream I had generated from my server. Why do I need debugging you ask? Well, I was having random errors in the AMF stream (no doubt due to my encoding) while encoding strings. Due to time-constraints I had decided to switch to JSON. This meant I had to write a json parser for flex (as I could not find one at the time). Not too bad as it gave me a lot of insight into what was being sent and so on. One day when I earn more free time at work I may decided to debug my AMF encoder.
No comments yet.
Leave a comment
-
Recent
-
Links
-
Archives
- October 2009 (1)
- August 2009 (1)
- May 2009 (1)
- January 2009 (1)
- December 2008 (1)
- November 2008 (1)
- October 2008 (1)
- August 2008 (1)
- June 2008 (1)
- May 2008 (2)
- April 2008 (1)
- March 2008 (2)
-
Categories
-
RSS
Entries RSS
Comments RSS