Integrated Google Protocol Buffers, upgraded netty to latest version #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Abraham,
Here is the Google Protocol Buffers integration as we discussed on groups:
https://groups.google.com/forum/#!topic/jetserver/5rIxGCsgYac
For reference, here are Protocol Buffer's docs:
https://developers.google.com/protocol-buffers/
The integration is pretty generic. As per Protocol Buffer's pattern, there is a .proto file that can be run by gradle / ant / maven to autogenerate the NadronMessages class (which I've also committed). This contains the NadronEvent message which is the Protobuf version of Nadron's Event message ... it contains the same fields and the "Source" field is represented as the "Any" type in Protocol Buffers, which means it can be used to contain any other serialised protocol buffers message. This way any game related messages can be defined in their own .proto files and loaded into the NadronEvent.
To convert incoming Protocol Buffers "NadronEvent" s to Nadron's "Event" class, there is a ProtobufEventToEventDecoder class which is tacked on at the the ProtobufProtocol pipeline. From there it ties into Nadron's session handlers as before.
As a demo I have a serialisation unit test and a test main class, placed in similar styles and locations to what you had.
Aside from the protobuf integration I corrected a typo and upgraded Netty.
Let me know if you need anything else to pull this in, and thanks again for your help earlier.