Files changed (1)
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
+Each packet starts with a header that consist of the total packet length + packet identifier. The length is a 32 bit integer and The identifier is an unsigned 8 bit value (1-255) that identifies each packet within the protocol.
is wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-The wiki itself is actually a mercurial repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
+Lists are serialized with a 32 bit length prefix and strings are serialized with a 16 bit length prefix.
Wiki pages are normal files ,wi th the .wiki extension. You can edit them locally, as well as creating new ones.
You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
+The source for the generator is a XML file that defines each object, it has a two different types that can be used:
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
+All names will be camelcased and stripped from the underscore automatically by the generator, the above XML-snippet will produce an enum with the name "NameOfEnum".
+The struct parameters are name and an optional id, the id parameter defines the class ID, if not specified, the styx generator will use the next availabe id (last seen +1). This ID is equivalent to the ID header in the binary wire format.
+A struct member can be either a var or a list of vars, both lists and vars have a name and type parameter, example:
+The type can be of the basic primitives, enums or other structs. For example: To create a list of the above struct in a new object called "TestListPacket" we define it like this in the xml file:
+The byte serialized stream for the TestListPacket with one TestPacket object containing the string ”test” in the name member will look like this:
+The JSON packaging of the same will look like below, note the "classId" members which are sued to identify each Styx struct type. Also, each member is identified by name, making the protocol more verbal than the binary packaging but also elegible for compression: